From 3d196ef57f5284370652f2d8fb4436a26fc5a99e Mon Sep 17 00:00:00 2001 From: Dan Ungureanu Date: Thu, 11 Feb 2016 16:12:28 +0200 Subject: [PATCH] Fixes #11677. sql-parser and php-gettext collide. Signed-off-by: Dan Ungureanu --- ChangeLog | 1 + libraries/sql-parser/autoload.php | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8be22c177f71..4481c3f1f8ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,7 @@ phpMyAdmin - ChangeLog - issue #11800 Syntax Verifier error using REGEXP in SQL statement - issue #11799 Backslashes in comments are being interpreted as escape characters - issue #11909 Can't insert row into table that contains generated column +- issue #11677 sql-parser and php-gettext collide. 4.5.4.1 (2016-01-29) - issue #11892 Error with PMA 4.4.15.3 diff --git a/libraries/sql-parser/autoload.php b/libraries/sql-parser/autoload.php index da6bfe0a8ccf..21298b6ced0f 100644 --- a/libraries/sql-parser/autoload.php +++ b/libraries/sql-parser/autoload.php @@ -63,6 +63,12 @@ public static function getLoader(array $map) } } +// php-gettext is used to translate error messages. +// This must be included before any class of the parser is loaded because +// if there is no `__` function defined, the library defines a dummy one +// in `common.php`. +require_once './libraries/php-gettext/gettext.inc'; + // Initializing the autoloader. return AutoloaderInit::getLoader( array(