[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_7_1-23461-g3dce618

Marc Delisle lem9 at users.sourceforge.net
Sat Nov 26 12:56:09 CET 2011


The branch, master has been updated
       via  3dce618b7bd49c275584169882de61ce079eebdb (commit)
       via  5e6173015709d67c40877bcf51a5c4520e83f9de (commit)
      from  277b6a96fa8046fe9eaaec61cee50ad675766262 (commit)


- Log -----------------------------------------------------------------
commit 3dce618b7bd49c275584169882de61ce079eebdb
Merge: 277b6a9 5e61730
Author: Marc Delisle <marc at infomarc.info>
Date:   Sat Nov 26 06:54:49 2011 -0500

    Merge branch 'QA_3_4'

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                |    1 +
 libraries/common.inc.php |   30 ++++++++++++++++++++----------
 2 files changed, 21 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 430c97b..9fb4838 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -64,6 +64,7 @@ phpMyAdmin - ChangeLog
 3.4.9.0 (not yet released)
 - bug #3442028 [edit] Inline editing enum fields with null shows no dropdown
 - bug #3442004 [interface] DB suggestion not correct for user with underscore
+- bug #3438420 [core] Magic quotes removed in PHP 5.4
 
 3.4.8.0 (not yet released)
 - bug #3425230 [interface] enum data split at space char (more space to edit)
diff --git a/libraries/common.inc.php b/libraries/common.inc.php
index 730cf19..ad5d613 100644
--- a/libraries/common.inc.php
+++ b/libraries/common.inc.php
@@ -69,11 +69,15 @@ if (version_compare(phpversion(), '5.3', 'lt')) {
 }
 
 /**
- * Avoid problems with magic_quotes_runtime
- * (in the future, this setting will be removed but it's not yet
- * known in which PHP version)
+ * This setting was removed in PHP 5.4. But at this point PMA_PHP_INT_VERSION
+ * is not yet defined so we use another way to find out the PHP version.
  */
- at ini_set('magic_quotes_runtime', false);
+if (version_compare(phpversion(), '5.4', 'lt')) {
+    /**
+     * Avoid problems with magic_quotes_runtime
+     */ 
+    @ini_set('magic_quotes_runtime', false);
+}
 
 /**
  * for verification in all procedural scripts under libraries
@@ -253,12 +257,18 @@ if (isset($_POST['usesubform'])) {
 }
 // end check if a subform is submitted
 
-// remove quotes added by php
-if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
-    PMA_arrayWalkRecursive($_GET, 'stripslashes', true);
-    PMA_arrayWalkRecursive($_POST, 'stripslashes', true);
-    PMA_arrayWalkRecursive($_COOKIE, 'stripslashes', true);
-    PMA_arrayWalkRecursive($_REQUEST, 'stripslashes', true);
+/**
+ * This setting was removed in PHP 5.4. But at this point PMA_PHP_INT_VERSION
+ * is not yet defined so we use another way to find out the PHP version.
+ */
+if (version_compare(phpversion(), '5.4', 'lt')) {
+    // remove quotes added by PHP
+    if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
+        PMA_arrayWalkRecursive($_GET, 'stripslashes', true);
+        PMA_arrayWalkRecursive($_POST, 'stripslashes', true);
+        PMA_arrayWalkRecursive($_COOKIE, 'stripslashes', true);
+        PMA_arrayWalkRecursive($_REQUEST, 'stripslashes', true);
+    }
 }
 
 /**


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list