Skip to content

Commit 3ec9c23

Browse files
monneratleenooks
authored andcommitted
Do not call get_magic_quote_gpc() when running in PHP version >= 5.4.
This deprecated function has been removed in PHP 8.
1 parent 857f0c5 commit 3ec9c23

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/common.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,9 @@ function stopwatch() {
297297
* Strip slashes from GET, POST, and COOKIE variables if this
298298
* PHP install is configured to automatically addslashes()
299299
*/
300-
if (@get_magic_quotes_gpc() && (! isset($slashes_stripped) || ! $slashes_stripped)) {
300+
if (@version_compare(phpversion(), '5.4.0', '<') &&
301+
@get_magic_quotes_gpc() &&
302+
(!isset($slashes_stripped) || !$slashes_stripped)) {
301303
array_stripslashes($_REQUEST);
302304
array_stripslashes($_GET);
303305
array_stripslashes($_POST);

0 commit comments

Comments
 (0)