[BUGFIX] Fix isMissing called on Null error 50/58850/2
authorBernhard Sirlinger <bernhard@sirlinger.de>
Mon, 5 Nov 2018 21:12:40 +0000 (22:12 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Mon, 5 Nov 2018 22:16:58 +0000 (23:16 +0100)
Add a Null check in FileLinktype->checkLink
function

Resolves: #86857
Releases: master,8.7
Change-Id: I2cc270dd7b8392fa8fd240c6efca3894f0ce3273
Reviewed-on: https://review.typo3.org/58850
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/linkvalidator/Classes/Linktype/FileLinktype.php

index ac73527..2358f63 100644 (file)
@@ -39,6 +39,7 @@ class FileLinktype extends AbstractLinktype
         }
         return $type;
     }
+
     /**
      * Checks a given URL + /path/filename.ext for validity
      *
@@ -57,7 +58,8 @@ class FileLinktype extends AbstractLinktype
         } catch (FolderDoesNotExistException $e) {
             return false;
         }
-        return !$file->isMissing();
+
+        return ($file !== null) ? !$file->isMissing() : false;
     }
 
     /**