From ed48153e7b73a90a902138a2e33c9ab2ac312d20 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sun, 9 Feb 2020 16:23:56 +0100 Subject: [PATCH] Fix Uncaught TypeError: Argument 4 passed to PhpMyAdmin\ErrorHandler::addError() must be of the type int Uncaught TypeError: Argument 4 passed to PhpMyAdmin\ErrorHandler::addError() must be of the type int Signed-off-by: William Desportes --- libraries/classes/Core.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libraries/classes/Core.php b/libraries/classes/Core.php index 581afbc9ef..2b17fcc0ad 100644 --- a/libraries/classes/Core.php +++ b/libraries/classes/Core.php @@ -352,6 +352,9 @@ class Core bool $fatal = false, string $extra = '' ): void { + /** @var ErrorHandler $error_handler */ + global $error_handler; + /* Gettext does not have to be loaded yet here */ if (function_exists('__')) { $message = __( @@ -374,11 +377,11 @@ class Core return; } - $GLOBALS['error_handler']->addError( + $error_handler->addError( $message, E_USER_WARNING, '', - '', + 0, false ); }