I have been trying to eliminate a deprecated PHP function (get_magic_quotes_gpc()) from impress pages CMS and all efforts proved abortive.
There is this section of the code that has the deprecated function.
public function fixMagicQuotes()
{
if (!get_magic_quotes_gpc()) {
return;
}
$process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);
while (list($key, $val) = each($process)) {
foreach ($val as $k => $v) {
unset($process[$key][$k]);
if (is_array($v)) {
$process[$key][stripslashes($k)] = $v;
$process[] = & $process[$key][stripslashes($k)];
} else {
$process[$key][stripslashes($k)] = stripslashes($v);
}
}
}
unset($process);
}
All I need is to remove the deprecated function from the application logic.
I have tried stripslashes(), removed the function itself but its either the page goes blank or it throws more error.
Please note: I have checked the alternative URL (PHP 7.4 deprecated get_magic_quotes_gpc function alternative) and there was no concrete solution regarding fixing this error, especially with respect to Impress Page CMS.
Is there any other alternatives that can help in solving this issue?
Thanks