File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,13 +114,15 @@ public static function getNullsafeShortcircuitedExpr(Expr $expr): Expr
114114 $ result = new Expr \StaticPropertyFetch ($ result , $ node ->name );
115115 }
116116
117- if ($ result === $ node ) {
118- // This level shortcircuits to itself — the nullsafe operator is
119- // above it, not inside it. Only that answer is remembered: a
120- // rebuilt expression stays freshly built, because callers compare
121- // the result with === to tell whether anything was rewritten.
122- $ node ->setAttribute (self ::SHORTCIRCUITED_ATTRIBUTE , true );
117+ if ($ result !== $ node ) {
118+ continue ;
123119 }
120+
121+ // This level shortcircuits to itself — the nullsafe operator is
122+ // above it, not inside it. Only that answer is remembered: a
123+ // rebuilt expression stays freshly built, because callers compare
124+ // the result with === to tell whether anything was rewritten.
125+ $ node ->setAttribute (self ::SHORTCIRCUITED_ATTRIBUTE , true );
124126 }
125127
126128 return $ result ;
You can’t perform that action at this time.
0 commit comments