-
-
Notifications
You must be signed in to change notification settings - Fork 742
Closed
rectorphp/rector-src
#6862Labels
Description
Bug Report
| Subject | Details |
|---|---|
| Rector version | Rector 2.0.11 |
The IssetOnPropertyObjectToPropertyExistsRector changes code while it shouldn't.
Minimal PHP Code Causing Issue
https://getrector.com/demo/fc241ad4-ac82-4120-bfe7-27ffc62ac965
- if (! isset($values['_identity']->value)) {
+ if ($values['_identity']->value === null) {Expected Behaviour
Rector should leave this code snippet, or allow for the array key to not exist, like:
- if (! isset($values['_identity']->value)) {
+ if ($values['_identity']?->value === null) {Reactions are currently unavailable