Hi!
I've created a pull to fix bug 49348 - when undefined properties do not
produce a notice when doing something like $this->undefined++, unlike
regular variables that do.
Unfortunately, this fix seems to require changing signature of
get_property_ptr_ptr(), adding fetch type, which makes it impossible for
5.4, and which would require any module that is compiled for 5.5 add
ifdefs if they override this handler (of course, I've fixed the ones in
the core). The pull is at: https://github.com/php/php-src/pull/281
However, I think that even though missing notice is not that big a deal,
having properties behaving inconsistently is, so this needs to be fixed.
Anybody has any objection or sees something wrong with the patch?
Also, if somebody has an idea of a better fix that won't require
changing the API, it's be nice, I couldn't think of any.
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227
On Tue, Feb 19, 2013 at 4:23 AM, Stas Malyshev smalyshev@sugarcrm.comwrote:
Hi!
I've created a pull to fix bug 49348 - when undefined properties do not
produce a notice when doing something like $this->undefined++, unlike
regular variables that do.Unfortunately, this fix seems to require changing signature of
get_property_ptr_ptr(), adding fetch type, which makes it impossible for
5.4, and which would require any module that is compiled for 5.5 add
ifdefs if they override this handler (of course, I've fixed the ones in
the core). The pull is at: https://github.com/php/php-src/pull/281However, I think that even though missing notice is not that big a deal,
having properties behaving inconsistently is, so this needs to be fixed.
Anybody has any objection or sees something wrong with the patch?
Looks like a reasonable fix to me. It's unfortunate it has to wait for 5.5,
but I couldn't think of a more clever fix that wouldn't break the API.
Also, if somebody has an idea of a better fix that won't require
changing the API, it's be nice, I couldn't think of any.Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227
I've created a pull to fix bug 49348 - when undefined properties do not
produce a notice when doing something like $this->undefined++, unlike
regular variables that do.
I've been bitten by this from time to time. A notice would have been nice.
Hi Stas,
I'll take a look tomorrow or after tomorrow.
Sorry, quite busy.
Thanks. Dmitry.
On Tue, Feb 19, 2013 at 1:23 PM, Stas Malyshev smalyshev@sugarcrm.comwrote:
Hi!
I've created a pull to fix bug 49348 - when undefined properties do not
produce a notice when doing something like $this->undefined++, unlike
regular variables that do.Unfortunately, this fix seems to require changing signature of
get_property_ptr_ptr(), adding fetch type, which makes it impossible for
5.4, and which would require any module that is compiled for 5.5 add
ifdefs if they override this handler (of course, I've fixed the ones in
the core). The pull is at: https://github.com/php/php-src/pull/281However, I think that even though missing notice is not that big a deal,
having properties behaving inconsistently is, so this needs to be fixed.
Anybody has any objection or sees something wrong with the patch?Also, if somebody has an idea of a better fix that won't require
changing the API, it's be nice, I couldn't think of any.Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227
Hi Stas,
The idea of the fix is fine (I didn't check all the related changes in PHP
extensions).
I think it must be included into 5.5.
Thanks. Dmitry.
On Tue, Feb 19, 2013 at 1:23 PM, Stas Malyshev smalyshev@sugarcrm.comwrote:
Hi!
I've created a pull to fix bug 49348 - when undefined properties do not
produce a notice when doing something like $this->undefined++, unlike
regular variables that do.Unfortunately, this fix seems to require changing signature of
get_property_ptr_ptr(), adding fetch type, which makes it impossible for
5.4, and which would require any module that is compiled for 5.5 add
ifdefs if they override this handler (of course, I've fixed the ones in
the core). The pull is at: https://github.com/php/php-src/pull/281However, I think that even though missing notice is not that big a deal,
having properties behaving inconsistently is, so this needs to be fixed.
Anybody has any objection or sees something wrong with the patch?Also, if somebody has an idea of a better fix that won't require
changing the API, it's be nice, I couldn't think of any.Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227
Hi!
The idea of the fix is fine (I didn't check all the related changes in
PHP extensions).
I think it must be included into 5.5.
Thanks for reviewing it! If I don't head any objections in next couple
of days, I'll merge it to 5.5.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227