diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php index bb4a74c49ddac..b5ee9f0531cff 100644 --- a/apps/dav/lib/Connector/Sabre/File.php +++ b/apps/dav/lib/Connector/Sabre/File.php @@ -366,7 +366,8 @@ public function put($data) { } // since we skipped the view we need to scan and emit the hooks ourselves - $storage->getUpdater()->update($internalPath, null, ($writtenByteCount - $previousFileSize)); + $sizeDifference = isset($previousFileSize, $writtenByteCount) ? ($writtenByteCount - $previousFileSize) : null; + $storage->getUpdater()->update($internalPath, null, $sizeDifference); try { $this->changeLock(ILockingProvider::LOCK_SHARED);