diff --git a/lib/FilesHooks.php b/lib/FilesHooks.php index e401f9fde..90a93773d 100644 --- a/lib/FilesHooks.php +++ b/lib/FilesHooks.php @@ -1047,7 +1047,9 @@ protected function fixPathsForShareExceptions(array $affectedUsers, $shareId) { $query = $queryBuilder->executeQuery(); while ($row = $query->fetch()) { - $affectedUsers[$row['share_with']] = $row['file_target']; + if ($row['share_with'] !== null) { + $affectedUsers[$row['share_with']] = $row['file_target']; + } } return $affectedUsers;