From fe4b8192a9eb0b485673ee3854d6fc14cbe1dda1 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Fri, 11 Aug 2017 21:40:47 +0200 Subject: [PATCH] Remove magic_quotes function It is not there anymore on PHP7 --- inc/init.php | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/inc/init.php b/inc/init.php index be47441..9155428 100644 --- a/inc/init.php +++ b/inc/init.php @@ -20,27 +20,6 @@ session_name("ldapab"); session_start(); - //kill magic quotes - if (get_magic_quotes_gpc()) { - if (!empty($_GET)) remove_magic_quotes($_GET); - if (!empty($_POST)) remove_magic_quotes($_POST); - if (!empty($_COOKIE)) remove_magic_quotes($_COOKIE); - if (!empty($_REQUEST)) remove_magic_quotes($_REQUEST); - if (!empty($_SESSION)) remove_magic_quotes($_SESSION); - ini_set('magic_quotes_gpc', 0); - } - @set_magic_quotes_runtime(0); - - function remove_magic_quotes(&$array) { - foreach (array_keys($array) as $key) { - if (is_array($array[$key])) { - remove_magic_quotes($array[$key]); - }else { - $array[$key] = stripslashes($array[$key]); - } - } - } - //prepare SMARTY object $smarty = new Smarty; $smarty->compile_dir = dirname(__FILE__).'/../cache'; -- 2.39.5