unset($requestedProperties[array_search($fileid_propertyname, $requestedProperties)]);
/** @var $node OC_Connector_Sabre_Node */
- $returnedProperties[200][$fileid_propertyname] = $node->getFileId();
+ $fileId = $node->getFileId();
+ if (!is_null($fileId)) {
+ $returnedProperties[200][$fileid_propertyname] = $fileId;
+ }
}
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;
}
}