Skip to content

Commit 0be2622

Browse files
Merge branch '5.4' into 6.2
* 5.4: [PropertyAccess] Fix access to undefined "file" key when checking stack frames
2 parents e267665 + 6f2e603 commit 0be2622

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/PropertyAccess/PropertyAccessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ private function readProperty(array $zval, string $property, bool $ignoreInvalid
410410
[$trace] = $e->getTrace();
411411

412412
// handle uninitialized properties in PHP >= 7
413-
if (__FILE__ === $trace['file']
413+
if (__FILE__ === ($trace['file'] ?? null)
414414
&& $name === $trace['function']
415415
&& $object instanceof $trace['class']
416416
&& preg_match('/Return value (?:of .*::\w+\(\) )?must be of (?:the )?type (\w+), null returned$/', $e->getMessage(), $matches)

0 commit comments

Comments
 (0)