diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index 819a4d9ae29c02d2a433f9a77e4b507881fc94ac..ca129be8275805e2f317c91c86197d738efc08f1 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -299,13 +299,10 @@ function watchdog_exception($type, Exception $exception, $message = NULL, $varia * (optional) The filename that the error was raised in. * @param $line * (optional) The line number the error was raised at. - * @param $context - * (optional) An array that points to the active symbol table at the point the - * error occurred. */ -function _drupal_error_handler($error_level, $message, $filename = NULL, $line = NULL, $context = NULL) { +function _drupal_error_handler($error_level, $message, $filename = NULL, $line = NULL) { require_once __DIR__ . '/errors.inc'; - _drupal_error_handler_real($error_level, $message, $filename, $line, $context); + _drupal_error_handler_real($error_level, $message, $filename, $line); } /** diff --git a/core/includes/errors.inc b/core/includes/errors.inc index cb5edf21808fa3f5b41b457deaa94cbdeaebc2e0..23ed7d4bb7880033e731c07eada81bec011e1482 100644 --- a/core/includes/errors.inc +++ b/core/includes/errors.inc @@ -54,11 +54,8 @@ function drupal_error_levels() { * The filename that the error was raised in. * @param $line * The line number the error was raised at. - * @param $context - * An array that points to the active symbol table at the point the error - * occurred. */ -function _drupal_error_handler_real($error_level, $message, $filename, $line, $context) { +function _drupal_error_handler_real($error_level, $message, $filename, $line) { if ($error_level & error_reporting()) { $types = drupal_error_levels(); list($severity_msg, $severity_level) = $types[$error_level]; diff --git a/core/tests/Drupal/KernelTests/Core/Database/QueryTest.php b/core/tests/Drupal/KernelTests/Core/Database/QueryTest.php index f568f9d1b4923e9d85267dc9e5b6fde0105552ce..e1d7c2739f7614f642f9ad55684cb837c4a59100 100644 --- a/core/tests/Drupal/KernelTests/Core/Database/QueryTest.php +++ b/core/tests/Drupal/KernelTests/Core/Database/QueryTest.php @@ -67,14 +67,14 @@ public function testArrayArgumentsSQLInjection() { public function testConditionOperatorArgumentsSQLInjection() { $injection = "IS NOT NULL) ;INSERT INTO {test} (name) VALUES ('test12345678'); -- "; - $previous_error_handler = set_error_handler(function ($severity, $message, $filename, $lineno, $context) use (&$previous_error_handler) { + $previous_error_handler = set_error_handler(function ($severity, $message, $filename, $lineno) use (&$previous_error_handler) { // Normalize the filename to use UNIX directory separators. if (preg_match('@core/lib/Drupal/Core/Database/Query/Condition.php$@', str_replace(DIRECTORY_SEPARATOR, '/', $filename))) { // Convert errors to exceptions for testing purposes below. throw new \ErrorException($message, 0, $severity, $filename, $lineno); } if ($previous_error_handler) { - return $previous_error_handler($severity, $message, $filename, $lineno, $context); + return $previous_error_handler($severity, $message, $filename, $lineno); } }); try { diff --git a/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryTest.php b/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryTest.php index e4bed4e3a4ebaf0659a31fd6032a17e17adb931a..dcb3b0f19660258d74af5bb2b3dda47c49e02d1b 100644 --- a/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryTest.php +++ b/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryTest.php @@ -103,13 +103,13 @@ public function testGetLibraryByName() { * Tests getting a deprecated library. */ public function testAssetLibraryDeprecation() { - $previous_error_handler = set_error_handler(function ($severity, $message, $file, $line, $context) use (&$previous_error_handler) { + $previous_error_handler = set_error_handler(function ($severity, $message, $file, $line) use (&$previous_error_handler) { // Convert deprecation error into a catchable exception. if ($severity === E_USER_DEPRECATED) { throw new \ErrorException($message, 0, $severity, $file, $line); } if ($previous_error_handler) { - return $previous_error_handler($severity, $message, $file, $line, $context); + return $previous_error_handler($severity, $message, $file, $line); } });