From 9bee1905c81d229cd16bd8edb98fc2181f05feeb Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Tue, 24 Dec 2019 17:30:12 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B02329=20PHP=207.4=20compat=20:=20remove?= =?UTF-8?q?=20get=5Fmagic=5Fquotes=5Fgpc/get=5Fmagic=5Fquotes=5Fruntime=20?= =?UTF-8?q?calls=20Methods=20are=20now=20deprecated=20and=20since=20PHP=20?= =?UTF-8?q?5.4=20were=20always=20returning=20false?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/wizardhelper.class.inc.php | 4 ---- core/MyHelpers.class.inc.php | 2 +- setup/setuputils.class.inc.php | 15 --------------- 3 files changed, 1 insertion(+), 20 deletions(-) diff --git a/application/wizardhelper.class.inc.php b/application/wizardhelper.class.inc.php index 8193bd2d6..dbcfe085a 100644 --- a/application/wizardhelper.class.inc.php +++ b/application/wizardhelper.class.inc.php @@ -273,10 +273,6 @@ class WizardHelper static public function FromJSON($sJSON) { $oWizHelper = new WizardHelper(); - if (get_magic_quotes_gpc()) - { - $sJSON = stripslashes($sJSON); - } $aData = json_decode($sJSON, true); // true means hash array instead of object $oWizHelper->m_aData = $aData; return $oWizHelper; diff --git a/core/MyHelpers.class.inc.php b/core/MyHelpers.class.inc.php index a1cdeb832..9d78d657c 100644 --- a/core/MyHelpers.class.inc.php +++ b/core/MyHelpers.class.inc.php @@ -457,7 +457,7 @@ class Str public static function gpc2pure($gpc) { if (ini_get('magic_quotes_sybase')) $pure = str_replace("''", "'", $gpc); - else $pure = get_magic_quotes_gpc() ? stripslashes($gpc) : $gpc; + else $pure = $gpc; return $pure; } public static function html2pure($html) diff --git a/setup/setuputils.class.inc.php b/setup/setuputils.class.inc.php index b0ea1fb84..c1c7a7b91 100644 --- a/setup/setuputils.class.inc.php +++ b/setup/setuputils.class.inc.php @@ -265,21 +265,6 @@ class SetupUtils SetupPage::log("Info - max_file_uploads: ".ini_get('max_file_uploads')); // Check some more ini settings here, needed for file upload - if (function_exists('get_magic_quotes_gpc')) - { - if (@get_magic_quotes_gpc()) - { - $aResult[] = new CheckResult(CheckResult::ERROR, "'magic_quotes_gpc' is set to On. Please turn it Off in php.ini before continuing."); - } - } - if (function_exists('get_magic_quotes_runtime')) - { - if (@get_magic_quotes_runtime()) - { - $aResult[] = new CheckResult(CheckResult::ERROR, "'magic_quotes_runtime' is set to On. Please turn it Off in php.ini before continuing."); - } - } - $sMemoryLimit = trim(ini_get('memory_limit')); if (empty($sMemoryLimit)) {