Unverified Commit ba28c93e authored by larowlan's avatar larowlan

Issue #3174022 by andypost, alexpott: call_user_func_array() and named arguments in PHP 8

parent eaf33de1
......@@ -97,7 +97,8 @@ public function doTrustedCallback(callable $callback, array $args, $message, $er
}
}
return call_user_func_array($callback, $args);
// @TODO Allow named arguments in https://www.drupal.org/node/3174150
return call_user_func_array($callback, array_values($args));
}
}
......@@ -49,7 +49,7 @@ protected function setUp(): void {
*/
public function testBlocks() {
foreach ($this->getBlockTests() as $test) {
call_user_func_array([$this, 'doTestBlocks'], $test);
call_user_func_array([$this, 'doTestBlocks'], array_values($test));
}
}
......
......@@ -955,7 +955,7 @@ private static function getModulesToEnable($class) {
// Modules have been collected in reverse class hierarchy order; modules
// defined by base classes should be sorted first. Then, merge the results
// together.
$modules = array_reverse($modules);
$modules = array_values(array_reverse($modules));
return call_user_func_array('array_merge_recursive', $modules);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment