Re: get_magic_quotes_gpc() returns false instead of 0
| From: | Ángel González | Date: | Tue, 24 Apr 2012 21:51:07 +0000 |
| Subject: | Re: get_magic_quotes_gpc() returns false instead of 0 | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-60295@lists.php.net to get a copy of this message | ||
On 24/04/12 18:11, Paul Dragoonis wrote:
> Happy to patch this once someone confirms this is a bug and not
> "changed behaviour" in 5.4.
>
> - Paul.
Why would such behavior change be desired?
get_magic_quotes_gpc() is kept only for compatibility with scripts which
did magic quote detection.
As such, it should return its 'traditional' value.
get_magic_quotes_gpc() got wrongly deprecated in 5.4, then restored...
I think that when implementing it to always return that there are no
magic_quotes,
it was just inadvertedly changed to false. Which is the "logical" thing
as those 0/1 work as
booleans, but that should have been done long ago, when designing it,
not now.
Regards