From f000222ca5345d40efa920e52317bdd3bc8c5ea4 Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Fri, 20 Nov 2020 10:55:55 +0100 Subject: [PATCH] AutoloadSourceLocator - handled nonexistent file reported by ReflectionFunction::getFileName() --- .../BetterReflection/SourceLocator/AutoloadSourceLocator.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Reflection/BetterReflection/SourceLocator/AutoloadSourceLocator.php b/src/Reflection/BetterReflection/SourceLocator/AutoloadSourceLocator.php index ad9629b23d..226121f1ba 100644 --- a/src/Reflection/BetterReflection/SourceLocator/AutoloadSourceLocator.php +++ b/src/Reflection/BetterReflection/SourceLocator/AutoloadSourceLocator.php @@ -84,6 +84,9 @@ public function locateIdentifier(Reflector $reflector, Identifier $identifier): if (!is_string($reflectionFileName)) { return null; } + if (!file_exists($reflectionFileName)) { + return null; + } return $this->findReflection($reflector, $reflectionFileName, $identifier, null); }