Hello everyone,
The following bug report brings up a good point:
The get_magic_quotes_gpc()
function returns 0/1 before 5.4, but now
it returns boolean false. Instead it should return 0. Fixing this
feels like a bug fix, which would go in 5.4.1. Thoughts?
Regards,
Philip
Happy to patch this once someone confirms this is a bug and not
"changed behaviour" in 5.4.
- Paul.
Hello everyone,
The following bug report brings up a good point:
The
get_magic_quotes_gpc()
function returns 0/1 before 5.4, but now
it returns boolean false. Instead it should return 0. Fixing this
feels like a bug fix, which would go in 5.4.1. Thoughts?Regards,
Philip
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
Hi!
The
get_magic_quotes_gpc()
function returns 0/1 before 5.4, but now
it returns boolean false. Instead it should return 0. Fixing this
feels like a bug fix, which would go in 5.4.1. Thoughts?
I do not see a reason to hold 5.4.1 for this.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227
Hi!
The
get_magic_quotes_gpc()
function returns 0/1 before 5.4, but now
it returns boolean false. Instead it should return 0. Fixing this
feels like a bug fix, which would go in 5.4.1. Thoughts?I do not see a reason to hold 5.4.1 for this.
The less people beginning to rely on this bug the better, and this is
a critical time. The impact of this BC break feels larger considering
MQ is enabled by default in PHP 5.3 and below.
This change shouldn't damage the RC QA process as all this does (tm)
is change the return of false to 0. And considering that the magic
quotes feature is removed, this change should not affect other code.
Oh, sometimes it's nice that more people use == versus ===. ;)
Regards,
Philip
Hi!
The less people beginning to rely on this bug the better, and this is
a critical time. The impact of this BC break feels larger considering
MQ is enabled by default in PHP 5.3 and below.
I understand but a) nobody should be using magic quotes anyway and b)
holding release for 5.4.1 because of a very minor issue with easy
workaround doesn't seem productive for me. If we hold release for each
such thing, we'll never have 5.4.1 at all.
This change shouldn't damage the RC QA process as all this does (tm)
is change the return of false to 0. And considering that the magic
quotes feature is removed, this change should not affect other code.
Code change means we can't release. I'm not comfortable putting untested
code in the release. We'll get it in 5.4.2.
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227
Hi!
The less people beginning to rely on this bug the better, and this is
a critical time. The impact of this BC break feels larger considering
MQ is enabled by default in PHP 5.3 and below.I understand but a) nobody should be using magic quotes anyway and b)
holding release for 5.4.1 because of a very minor issue with easy
workaround doesn't seem productive for me. If we hold release for each
such thing, we'll never have 5.4.1 at all.
I don't understand why get_magic_quotes_gpc()
and get_magic_quotes_runtime()
get such a bad wrap. People using these functions are not using magic
quotes, but instead they (most) are writing code that will work in environments
that have it enabled. This helps code work in PHP 5.4 and below, as opposed
to only PHP 5.4 and above.
And yes, the number of people that use "=== false" here is small I reckon.
But this is a BC break in a BC function. Something feels very wrong about
that.
So I understand that we cannot hold a release for every bug and that we
have known bugs in every release, but will we revert this change after it
exists in two PHP releases? Whatever the case, this also means we'll have
to document this change… and here I was trying to be lazy. :)
Regards,
Philip