diff --git a/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php b/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php index 4548a0a52be..5b37ea9bd44 100644 --- a/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php +++ b/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php @@ -97,7 +97,8 @@ trait DoTrustedCallbackTrait { } } - 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)); } } diff --git a/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php b/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php index 2abcd36a044..c5ade5da8bb 100644 --- a/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php +++ b/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php @@ -49,7 +49,7 @@ class SettingsTrayBlockFormTest extends SettingsTrayTestBase { */ public function testBlocks() { foreach ($this->getBlockTests() as $test) { - call_user_func_array([$this, 'doTestBlocks'], $test); + call_user_func_array([$this, 'doTestBlocks'], array_values($test)); } } diff --git a/core/tests/Drupal/KernelTests/KernelTestBase.php b/core/tests/Drupal/KernelTests/KernelTestBase.php index ba7c5712fa1..88c956b661b 100644 --- a/core/tests/Drupal/KernelTests/KernelTestBase.php +++ b/core/tests/Drupal/KernelTests/KernelTestBase.php @@ -955,7 +955,7 @@ abstract class KernelTestBase extends TestCase implements ServiceProviderInterfa // 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); }