[Phpmyadmin-git] [SCM] phpMyAdmin branch, QA_3_4, updated. RELEASE_3_4_7_1-47-g5e61730
Marc Delisle
lem9 at users.sourceforge.net
Sat Nov 26 12:55:56 CET 2011
The branch, QA_3_4 has been updated
via 5e6173015709d67c40877bcf51a5c4520e83f9de (commit)
from dddcddbf38729f3362b2562671b510107df72b9b (commit)
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 1 +
libraries/common.inc.php | 30 ++++++++++++++++++++----------
2 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 343d6da..5355551 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,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 b695022..53eeb79 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