Skip to content

Commit

Permalink
PHP8 fix: get_magic_quotes_gpc() is no longer a function.
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-xo committed Feb 28, 2021
1 parent ec7f273 commit cd63662
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dir2cast.php
Original file line number Diff line number Diff line change
Expand Up @@ -1945,7 +1945,11 @@ public function output()
*/
function magic_stripslashes($s)
{
return get_magic_quotes_gpc() ? stripslashes($s) : $s;
if(function_exists('get_magic_quotes_gpc'))
{
return get_magic_quotes_gpc() ? stripslashes($s) : $s;
}
return $s;
}

/**
Expand Down

0 comments on commit cd63662

Please sign in to comment.