Skip to content

Commit

Permalink
Update json.php for php8 support
Browse files Browse the repository at this point in the history
get_magic_quotes_gpc() is not supported in php8, so stripslashes are always executed
  • Loading branch information
aoware authored Feb 26, 2024
1 parent ff69c8d commit b4bd656
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions json.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@
// break;
case 'POST':
foreach ($_POST as $key=>$val) {
if (get_magic_quotes_gpc()) {
$val = stripslashes($val);
}
$val = stripslashes($val);
$dec = @json_decode($val, true);
if ($dec === NULL) {
$err = response('Error decoding the argument '.quot($key).' => '.var_dump_inl($val), 400);
Expand Down

0 comments on commit b4bd656

Please sign in to comment.