-
-
Notifications
You must be signed in to change notification settings - Fork 946
Open
Labels
Milestone
Description
Bug report
The ?? usage on a nested array which parent key does not exist throwns an error but I would not expect it e.g.:
/** @var mixed[] $test */
$test = [];
var_dump($test['hello'][0] ?? 'world');Code snippet that reproduces the problem
https://phpstan.org/r/42618f11-503b-4ad6-ae43-0a2d642deff8
Its a similar issue to isset but instead the ?? (Null coalesce operator) is used: #8068
Expected output
No error should be shown
Did PHPStan help you today? Did it make you happy in any way?
We are shipping phpstan as part of our Sulu CMS skeleton since last 2.5 minor version to improve with rector the upgrade process and code quality of all Sulu based projects.
Reactions are currently unavailable