|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patch update_class_constants for Class/Object related Bug #63976Patch version 2013-02-14 17:30 UTC Return to Bug #63976 | Download this patchThis patch is obsolete Obsoleted by patches: Patch Revisions:Developer: mike@php.net
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 1a8d108..cc52c21 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -3623,6 +3623,10 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent
/* Inherit interfaces */
zend_do_inherit_interfaces(ce, parent_ce TSRMLS_CC);
+ if (parent_ce->type != ce->type || parent_ce->type == ZEND_USER_CLASS) {
+ zend_update_class_constants(parent_ce);
+ }
+
/* Inherit properties */
if (parent_ce->default_properties_count) {
int i = ce->default_properties_count + parent_ce->default_properties_count;
@@ -3656,7 +3660,6 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent
if (parent_ce->type != ce->type) {
/* User class extends internal class */
- zend_update_class_constants(parent_ce TSRMLS_CC);
if (parent_ce->default_static_members_count) {
int i = ce->default_static_members_count + parent_ce->default_static_members_count;
|
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 20:00:01 2025 UTC |