File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1167,7 +1167,11 @@ function qa_gpc_to_string($string)
11671167{
11681168 if (qa_to_override (__FUNCTION__ )) { $ args =func_get_args (); return qa_call_override (__FUNCTION__ , $ args ); }
11691169
1170- return get_magic_quotes_gpc () ? stripslashes ($ string ) : $ string ;
1170+ // get_magic_quotes_gpc always returns false from PHP 5.4; this avoids deprecation notice on PHP 7.4+
1171+ if (qa_php_version_below ('5.4.0 ' ))
1172+ return get_magic_quotes_gpc () ? stripslashes ($ string ) : $ string ;
1173+ else
1174+ return $ string ;
11711175}
11721176
11731177
@@ -1180,7 +1184,11 @@ function qa_string_to_gpc($string)
11801184{
11811185 if (qa_to_override (__FUNCTION__ )) { $ args =func_get_args (); return qa_call_override (__FUNCTION__ , $ args ); }
11821186
1183- return get_magic_quotes_gpc () ? addslashes ($ string ) : $ string ;
1187+ // get_magic_quotes_gpc always returns false from PHP 5.4; this avoids deprecation notice on PHP 7.4+
1188+ if (qa_php_version_below ('5.4.0 ' ))
1189+ return get_magic_quotes_gpc () ? addslashes ($ string ) : $ string ;
1190+ else
1191+ return $ string ;
11841192}
11851193
11861194
You can’t perform that action at this time.
0 commit comments