1
0
mirror of https://github.com/phpmyadmin/phpmyadmin.git synced 2026-10-28 07:41:55 +03:00

Define fake __ function in case of gettext is not loaded for fatal error

This commit is contained in:
Michal Čihař
2012-11-01 09:11:14 +01:00
parent 208ceacd53
commit 7ba44d3530

View File

@@ -220,12 +220,13 @@ function PMA_fatalError(
} else {
$error_message = strtr($error_message, array('<br />' => '[br]'));
if (function_exists('__')) {
$error_header = __('Error');
} else {
$error_header = 'Error';
/* Define fake gettext for fatal errors */
if (!function_exists('__')) {
function __($text) { return $text; }
}
$error_header = __('Error');
$lang = $GLOBALS['available_languages'][$GLOBALS['lang']][1];
$dir = $GLOBALS['text_dir'];