Skip to content

Commit

Permalink
fix overint#4 - get_magic_quotes_gpc() deprecated
Browse files Browse the repository at this point in the history
The magic quotes feature is completely removed as of PHP 8.0 Since it is impossible for it to be turned on, we do not need to stripslashes() at all now.
  • Loading branch information
RedDragonWebDesign committed May 4, 2023
1 parent 635af4c commit ad16aee
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/PaypalIPN.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,8 @@ function verifyIPN()
}
}
$req = 'cmd=_notify-validate';
$get_magic_quotes_exists = false;
if (function_exists('get_magic_quotes_gpc')) {
$get_magic_quotes_exists = true;
}
foreach ($myPost as $key => $value) {
if ($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) {
$value = urlencode(stripslashes($value));
} else {
$value = urlencode($value);
}
$value = urlencode($value);
$req .= "&$key=$value";
}

Expand Down

0 comments on commit ad16aee

Please sign in to comment.