aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Craig Andrews <candrews@integralblue.com> 2019-12-03 16:26:05 -0500
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-12-03 22:26:05 +0100
commitd33c0ff2caf4af887916b55070c42b504a5c1702 (patch)
treef26015afe511ff12209550eede0cb5b346ea0c13 /lib
parentadecd16aeca6ec540d9f9dfd3c614eeb4ea0e8d3 (diff)
Remove magicQuotesOff (#2697) (#2698)
* Remove magicQuotesOff (#2697) Magic quotes have been deprecated since PHP 5.4 and as of PHP 7.4 `get_magic_quotes_gpc()` displays a warning. * Remove unused Minz_Helper::stripslashes_r `Minz_Helper::stripslashes_r` is no longer used. It's last user was `Minz_Request::magicQuotesOff`
Diffstat (limited to 'lib')
-rw-r--r--lib/Minz/Helper.php11
-rw-r--r--lib/Minz/Request.php15
2 files changed, 0 insertions, 26 deletions
diff --git a/lib/Minz/Helper.php b/lib/Minz/Helper.php
index c328d9e6b..5fddbf91c 100644
--- a/lib/Minz/Helper.php
+++ b/lib/Minz/Helper.php
@@ -8,17 +8,6 @@
* La classe Helper représente une aide pour des tâches récurrentes
*/
class Minz_Helper {
- /**
- * Annule les effets des magic_quotes pour une variable donnée
- * @param $var variable à traiter (tableau ou simple variable)
- */
- public static function stripslashes_r($var) {
- if (is_array($var)) {
- return array_map(array('Minz_Helper', 'stripslashes_r'), $var);
- } else {
- return stripslashes($var);
- }
- }
/**
* Wrapper for htmlspecialchars.
diff --git a/lib/Minz/Request.php b/lib/Minz/Request.php
index 9235f873a..299467afb 100644
--- a/lib/Minz/Request.php
+++ b/lib/Minz/Request.php
@@ -100,7 +100,6 @@ class Minz_Request {
* Initialise la Request
*/
public static function init() {
- self::magicQuotesOff();
self::initJSON();
}
@@ -293,20 +292,6 @@ class Minz_Request {
}
}
- /**
- * Méthode désactivant les magic_quotes pour les variables
- * $_GET
- * $_POST
- * $_COOKIE
- */
- private static function magicQuotesOff() {
- if (get_magic_quotes_gpc()) {
- $_GET = Minz_Helper::stripslashes_r($_GET);
- $_POST = Minz_Helper::stripslashes_r($_POST);
- $_COOKIE = Minz_Helper::stripslashes_r($_COOKIE);
- }
- }
-
public static function isPost() {
return isset($_SERVER['REQUEST_METHOD']) &&
$_SERVER['REQUEST_METHOD'] === 'POST';