From 9c38100ca90288dabfc549c2dd9fa0f55583a42c Mon Sep 17 00:00:00 2001 From: Valentijn Sessink Date: Thu, 25 Apr 2024 08:34:02 +0200 Subject: [PATCH] get_magic_quotes has been removed from PHP, as can be seen here: https://www.php.net/manual/en/function.get-magic-quotes-gpc.php But the configuration setting it should report on, has been removed even earlier: in PHP 5.4.0: https://www.php.net/releases/5_4_0.php So this check serves no purpose - it has been returning "false" for 10 years. --- src/index.php | 5 ----- .../development-bundle/demos/autocomplete/search.php | 4 +--- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/index.php b/src/index.php index 3e7f121..d610bef 100644 --- a/src/index.php +++ b/src/index.php @@ -892,11 +892,6 @@ function strip_empty_lines($s, $max_empty_lines) { } } -// if magic quotes is enabled then stripslashes will be needed -if (get_magic_quotes_gpc() == 1) { - $query = stripslashes($query); -} - // If no query, so show last documents if (!$query) { if ($cfg['newest_on_empty_query']) { diff --git a/src/jquery/jquery-ui-1.9.2.custom/development-bundle/demos/autocomplete/search.php b/src/jquery/jquery-ui-1.9.2.custom/development-bundle/demos/autocomplete/search.php index 835772d..d318a4b 100644 --- a/src/jquery/jquery-ui-1.9.2.custom/development-bundle/demos/autocomplete/search.php +++ b/src/jquery/jquery-ui-1.9.2.custom/development-bundle/demos/autocomplete/search.php @@ -4,8 +4,6 @@ // no term passed - just exit early with no response if (empty($_GET['term'])) exit ; $q = strtolower($_GET["term"]); -// remove slashes if they were magically added -if (get_magic_quotes_gpc()) $q = stripslashes($q); $items = array( "Great Bittern"=>"Botaurus stellaris", @@ -587,4 +585,4 @@ // json_encode is available in PHP 5.2 and above, or you can install a PECL module in earlier versions echo json_encode($result); -?> \ No newline at end of file +?>