-
-
Notifications
You must be signed in to change notification settings - Fork 934
Closed
phpstan/phpstan-src
#1223Labels
Milestone
Description
Bug report
This may duplicate other issues as there are a few null coalescing issues logged but the issue here seems different based on the reproducers in those issues.
The if in the reproducer below causes PHPStan to output Access to an undefined property object::$message.. If you remove ->code from the if then there are no errors i.e.:
if (isset($response->error)) {
echo $response->error->message ?? '';
}
Code snippet that reproduces the problem
https://phpstan.org/r/b8e9d9e3-73bd-4d8b-a041-41224ecff481
Expected output
No errors
jk