Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
e37b830d
Commit
e37b830d
authored
May 06, 2020
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid magic quotes deprecation notice on PHP 7.4
Fixes #786.
parent
04e83ebf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
qa-base.php
qa-include/qa-base.php
+10
-2
No files found.
qa-include/qa-base.php
View file @
e37b830d
...
...
@@ -1167,7 +1167,11 @@ function qa_gpc_to_string($string)
{
if
(
qa_to_override
(
__FUNCTION__
))
{
$args
=
func_get_args
();
return
qa_call_override
(
__FUNCTION__
,
$args
);
}
return
get_magic_quotes_gpc
()
?
stripslashes
(
$string
)
:
$string
;
// get_magic_quotes_gpc always returns false from PHP 5.4; this avoids deprecation notice on PHP 7.4+
if
(
qa_php_version_below
(
'5.4.0'
))
return
get_magic_quotes_gpc
()
?
stripslashes
(
$string
)
:
$string
;
else
return
$string
;
}
...
...
@@ -1180,7 +1184,11 @@ function qa_string_to_gpc($string)
{
if
(
qa_to_override
(
__FUNCTION__
))
{
$args
=
func_get_args
();
return
qa_call_override
(
__FUNCTION__
,
$args
);
}
return
get_magic_quotes_gpc
()
?
addslashes
(
$string
)
:
$string
;
// get_magic_quotes_gpc always returns false from PHP 5.4; this avoids deprecation notice on PHP 7.4+
if
(
qa_php_version_below
(
'5.4.0'
))
return
get_magic_quotes_gpc
()
?
addslashes
(
$string
)
:
$string
;
else
return
$string
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment