Fix error when gettext is not yet loaded and we want to warn.
This happens when PHP is compiled without session support, which is checked before gettext is loaded.
This commit is contained in:
@@ -275,7 +275,13 @@ function PMA_getPHPDocLink($target) {
|
||||
*/
|
||||
function PMA_warnMissingExtension($extension, $fatal = false, $extra = '')
|
||||
{
|
||||
$message = sprintf(__('The %s extension is missing. Please check your PHP configuration.'),
|
||||
/* Gettext does not have to be loaded yet here */
|
||||
if (function_exists('__')) {
|
||||
$message = __('The %s extension is missing. Please check your PHP configuration.');
|
||||
} else {
|
||||
$message = 'The %s extension is missing. Please check your PHP configuration.';
|
||||
}
|
||||
$message = sprintf($message,
|
||||
'[a@' . PMA_getPHPDocLink('book.' . $extension . '.php') . '@Documentation][em]' . $extension . '[/em][/a]');
|
||||
if ($extra != '') {
|
||||
$message .= ' ' . $extra;
|
||||
|
Reference in New Issue
Block a user