diff --git a/ChangeLog b/ChangeLog index 665a72c344..8277a46fb0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ phpMyAdmin - ChangeLog - issue Invalid argument supplied for foreach() - issue array_key_exists() expects parameter 2 to be array - issue #11480 Notice Undefined index: drop_database +- issue #11486 Server variable edition in ANSI_QUOTES sql_mode: losing current value 4.5.0.0 (not yet released) + rfe Pagination for GIS visualization diff --git a/libraries/server_variables.lib.php b/libraries/server_variables.lib.php index ec9164313b..807aef8efe 100644 --- a/libraries/server_variables.lib.php +++ b/libraries/server_variables.lib.php @@ -25,9 +25,11 @@ function PMA_getAjaxReturnForGetVal($variable_doc_links) // Send with correct charset header('Content-Type: text/html; charset=UTF-8'); + // Do not use double quotes inside the query to avoid a problem + // when server is running in ANSI_QUOTES sql_mode $varValue = $GLOBALS['dbi']->fetchSingleRow( - 'SHOW GLOBAL VARIABLES WHERE Variable_name="' - . PMA_Util::sqlAddSlashes($_REQUEST['varName']) . '";', + 'SHOW GLOBAL VARIABLES WHERE Variable_name=\'' + . PMA_Util::sqlAddSlashes($_REQUEST['varName']) . '\';', 'NUM' ); if (isset($variable_doc_links[$_REQUEST['varName']][3])