Skip to content

Commit 9b4a0bd

Browse files
committed
Fix "offset might not exist" error in ArgumentsNormalizer
1 parent 230e9ee commit 9b4a0bd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Analyser/ArgumentsNormalizer.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,10 @@ public static function reorderArgs(ParametersAcceptor $parametersAcceptor, array
235235
null,
236236
);
237237
} elseif (array_key_exists($arg->name->toString(), $argumentPositions)) {
238-
$argName = $arg->name->toString();
239238
// order named args into the position the signature expects them
240239
$attributes = $arg->getAttributes();
241240
$attributes[self::ORIGINAL_ARG_ATTRIBUTE] = $arg;
242-
$reorderedArgs[$argumentPositions[$argName]] = new Arg(
241+
$reorderedArgs[$argumentPositions[$arg->name->toString()]] = new Arg(
243242
$arg->value,
244243
$arg->byRef,
245244
$arg->unpack,

0 commit comments

Comments
 (0)