From a47c6e8bea4fa15bf1455e6ac8413ce014a12932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 27 Jul 2010 09:11:18 +0200 Subject: [PATCH] This might be called without initialized gettext. --- libraries/core.lib.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libraries/core.lib.php b/libraries/core.lib.php index c1a0b4be4..d98320fe7 100644 --- a/libraries/core.lib.php +++ b/libraries/core.lib.php @@ -228,12 +228,18 @@ function PMA_fatalError($error_message, $message_args = null) } $error_message = strtr($error_message, array('
' => '[br]')); + if (function_exists('__')) { + $error_header = __('Error'); + } else { + $error_header = 'Error'; + } + // Displays the error message // (do not use & for parameters sent by header) $query_params = array( 'lang' => $GLOBALS['available_languages'][$GLOBALS['lang']][1], 'dir' => $GLOBALS['text_dir'], - 'type' => __('Error'), + 'type' => $error_header, 'error' => $error_message, ); header('Location: ' . (defined('PMA_SETUP') ? '../' : '') . 'error.php?'