Re: bug 49348 - notice on $this->undefined++
| From: | Sherif Ramadan | Date: | Tue, 19 Feb 2013 09:32:41 +0000 |
| Subject: | Re: bug 49348 - notice on $this->undefined++ | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-65926@lists.php.net to get a copy of this message | ||
On Tue, Feb 19, 2013 at 4:23 AM, Stas Malyshev <smalyshev@sugarcrm.com>wrote:
> 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?
>
>
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
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>