diff -u b/core/includes/bootstrap.inc b/core/includes/bootstrap.inc --- b/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -689,8 +689,9 @@ // Log the message to the watchdog and return an error page to the user. _drupal_log_error(Error::decodeException($exception), TRUE); } - // PHP 7 introduces Error throwables. - catch (\Error $error) { + // PHP 7 introduces ThrowableInterface, which covers both Error and + // Exception throwables. + catch (\ThrowableInterface $error) { _drupal_exception_handler_additional($exception, $error); } // In order to be compatibile with PHP 5 we also catch regular Exceptions. @@ -1098,8 +1099,9 @@ call_user_func_array($callback['callback'], $callback['arguments']); } } - // PHP 7 introduces Error throwables. - catch (\Error $error) { + // PHP 7 introduces ThrowableInterface, which covers both Error and + // Exception throwables. + catch (\ThrowableInterface $error) { _drupal_shutdown_function_handle_exception($error); } // In order to be compatibile with PHP 5 we also catch regular Exceptions.