From 2f620f597ab571ce03844e98693544e4bc18e48d Mon Sep 17 00:00:00 2001 From: Steven Tang Date: Sun, 8 Sep 2019 10:16:57 +0800 Subject: [PATCH] Update ExternalFilesService.php $file->getMountPoint()->getMountId() exception handling. Avoid null object and throw an exception. A quick and dirty fix! --- lib/Service/ExternalFilesService.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Service/ExternalFilesService.php b/lib/Service/ExternalFilesService.php index d1679f6..404850b 100644 --- a/lib/Service/ExternalFilesService.php +++ b/lib/Service/ExternalFilesService.php @@ -239,6 +239,10 @@ private function isMountFullGlobal(MountPoint $mount): bool { private function getMountPoint(Node $file): MountPoint { try { + if($file->getMountPoint()->getMountId() === null){ + throw new FileIsNotIndexableException('getMountId is null'); + } + return $this->getExternalMountById( $file->getMountPoint() ->getMountId()