Unverified Commit ba28c93e authored by Lee Rowlands's avatar Lee Rowlands
Browse files

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

parent eaf33de1
Loading
Loading
Loading
Loading
+2 −1
Changes for core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -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));
  }

}
+1 −1
Changes for core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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));
    }
  }

+1 −1
Changes for core/tests/Drupal/KernelTests/KernelTestBase.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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);
  }