diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-23 16:40:29 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-23 16:40:29 +0200 |
commit | b02a4857126337688e8ad40d5f74929d005037ac (patch) | |
tree | 1977e31bbce8fbaa55d3892c61760d03fa403d13 /lib/private/connector/sabre/node.php | |
parent | b60ae11db8b49aa2a06116625de07fa03349a8e3 (diff) | |
download | nextcloud-server-b02a4857126337688e8ad40d5f74929d005037ac.tar.gz nextcloud-server-b02a4857126337688e8ad40d5f74929d005037ac.zip |
handle case where fileid is not set
Diffstat (limited to 'lib/private/connector/sabre/node.php')
-rw-r--r-- | lib/private/connector/sabre/node.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/private/connector/sabre/node.php b/lib/private/connector/sabre/node.php index 5c0fd2dcadc..76fbc251100 100644 --- a/lib/private/connector/sabre/node.php +++ b/lib/private/connector/sabre/node.php @@ -272,8 +272,13 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr public function getFileId() { $this->getFileinfoCache(); - $instanceId = OC_Util::getInstanceId(); - $id = sprintf('%08d', $this->fileinfo_cache['fileid']); - return $instanceId . $id; + + if (isset($this->fileinfo_cache['fileid'])) { + $instanceId = OC_Util::getInstanceId(); + $id = sprintf('%08d', $this->fileinfo_cache['fileid']); + return $instanceId . $id; + } + + return null; } } |