Skip to content

Commit e496d71

Browse files
committed
PhpFunctionReflection - do not return nonexistent filename
1 parent 50aff6d commit e496d71

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Reflection/Php/PhpFunctionReflection.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,14 @@ public function getName(): string
111111
*/
112112
public function getFileName()
113113
{
114+
if ($this->filename === false) {
115+
return false;
116+
}
117+
118+
if (!file_exists($this->filename)) {
119+
return false;
120+
}
121+
114122
return $this->filename;
115123
}
116124

0 commit comments

Comments
 (0)