Edit report at https://bugs.php.net/bug.php?id=63976&edit=1

 ID:                 63976
 Comment by:         giacomo at boticca dot com
 Reported by:        don at smugmug dot com
 Summary:            Parent class incorrectly using child constant in
                     class property
 Status:             Closed
 Type:               Bug
 Package:            Class/Object related
 Operating System:   Ubuntu 12.04
 PHP Version:        5.4.10
 Assigned To:        dmitry
 Block user comment: N
 Private report:     N

 New Comment:

I agree this was a bug but as it breaks existing code it shouldn't have been 
released in the 5.4 branch. It should have thrown an E_WARNING at worst.

A backward incompatible change shouldn't be in a minor release, that's what 
major 
releases are for.


Previous Comments:
------------------------------------------------------------------------
[2013-03-19 13:06:25] dmi...@php.net

The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.



------------------------------------------------------------------------
[2013-03-19 13:05:49] dmi...@php.net

Automatic comment on behalf of dmi...@zend.com
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=7b0993bfb4b19bb160a72310b907c4fc12a5bef9
Log: Fixed bug #63976 (Parent class incorrectly using child constant in class 
property)

------------------------------------------------------------------------
[2013-03-19 12:35:21] m...@php.net

Reflection is also affected.

...and I couldn't come up with code yet, where parent:: is problematic.

------------------------------------------------------------------------
[2013-03-19 10:00:45] m...@php.net

Unfortunately, this also changes error messages to something like:

Undefined class constant 'Foo::B' instead of 'self::B'...

------------------------------------------------------------------------
[2013-03-19 09:59:23] m...@php.net

The following patch has been added/updated:

Patch Name: zend_do_fetch_constant
Revision:   1363687163
URL:        
https://bugs.php.net/patch-display.php?bug=63976&patch=zend_do_fetch_constant&revision=1363687163

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=63976


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=63976&edit=1

Reply via email to