diff -u b/core/includes/bootstrap.inc b/core/includes/bootstrap.inc --- b/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -679,7 +679,7 @@ * always fatal: the execution of the script will stop as soon as the exception * handler exits. * - * @param \ThrowableInterface $exception + * @param \Exception|\ThrowableInterface $exception * The exception object that was thrown. */ function _drupal_exception_handler($exception) { @@ -702,9 +702,9 @@ /** * Displays any additional errors caught while handling an exception. * - * @param \ThrowableInterface $exception + * @param \Exception|\ThrowableInterface $exception * The first exception object that was thrown. - * @param \ThrowableInterface $exception2 + * @param \Exception|\ThrowableInterface $exception2 * The second exception object that was thrown. */ function _drupal_exception_handler_additional($exception, $exception2) { @@ -1111,7 +1111,7 @@ /** * Displays and logs any errors that may happen during shutdown. * - * @param \ThrowableInterface $exception + * @param \Exception|\ThrowableInterface $exception * The exception object that was thrown. * * @see _drupal_shutdown_function() diff -u b/core/lib/Drupal/Core/Utility/Error.php b/core/lib/Drupal/Core/Utility/Error.php --- b/core/lib/Drupal/Core/Utility/Error.php +++ b/core/lib/Drupal/Core/Utility/Error.php @@ -33,7 +33,7 @@ /** * Decodes an exception and retrieves the correct caller. * - * @param \ThrowableInterface $exception + * @param \Exception|\ThrowableInterface $exception * The exception object that was thrown. * * @return array @@ -82,7 +82,7 @@ /** * Renders an exception error message without further exceptions. * - * @param \ThrowableInterface $exception + * @param \Exception|\ThrowableInterface $exception * The exception object that was thrown. * * @return string diff -u b/core/modules/system/src/Tests/System/ErrorHandlerTest.php b/core/modules/system/src/Tests/System/ErrorHandlerTest.php --- b/core/modules/system/src/Tests/System/ErrorHandlerTest.php +++ b/core/modules/system/src/Tests/System/ErrorHandlerTest.php @@ -76,9 +76,9 @@ // Remove the recoverable fatal error from the assertions, it's wanted here. // Ensure that we just remove this one recoverable fatal error (in PHP 7 this - // is a TypeException). + // is a TypeError). foreach ($this->assertions as $key => $assertion) { - if (in_array($assertion['message_group'], ['Recoverable fatal error', 'TypeException']) && strpos($assertion['message'], 'Argument 1 passed to Drupal\error_test\Controller\ErrorTestController::Drupal\error_test\Controller\{closure}() must be of the type array, string given, called in') !== FALSE) { + if (in_array($assertion['message_group'], ['Recoverable fatal error', 'TypeError']) && strpos($assertion['message'], 'Argument 1 passed to Drupal\error_test\Controller\ErrorTestController::Drupal\error_test\Controller\{closure}() must be of the type array, string given, called in') !== FALSE) { unset($this->assertions[$key]); $this->deleteAssert($assertion['message_id']); }