Skip to content

Commit ea5ccb7

Browse files
committed
Resolve undefined property access error
1 parent 7d6e988 commit ea5ccb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rules/DowngradePhp74/Rector/ArrowFunction/ArrowFunctionToAnonymousFunctionRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function refactor(Node $node): Closure
101101
$isAlsoParam = in_array(
102102
$node->expr->expr->name,
103103
array_map(function($param) {
104-
return $param->var->name;
104+
return $param->var instanceof Variable ? $param->var->name : null;
105105
}, $node->params)
106106
);
107107

0 commit comments

Comments
 (0)