Skip to content

Commit 59f1560

Browse files
authoredJan 17, 2025··
Merge pull request #54 from PHP-DI/revert-52-master
Revert "Replace `call_user_func_array` with native invocation"
2 parents 93d381d + 3561bf9 commit 59f1560

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed
 

‎src/Invoker.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ public function call($callable, array $parameters = [])
5757

5858
$args = $this->parameterResolver->getParameters($callableReflection, $parameters, []);
5959

60-
// Sort by array keys is needed since the resolved arguments returned by the resolver are indexed by numeric keys
61-
// that correspond to the parameters of the callable, but may be out of order.
60+
// Sort by array key because call_user_func_array ignores numeric keys
6261
ksort($args);
6362

6463
// Check all parameters are resolved
@@ -72,7 +71,7 @@ public function call($callable, array $parameters = [])
7271
));
7372
}
7473

75-
return $callable(...$args);
74+
return call_user_func_array($callable, $args);
7675
}
7776

7877
/**

0 commit comments

Comments
 (0)
Please sign in to comment.