mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Properly resolve magic method of preloaded classes inherited from internal ones.
This commit is contained in:
parent
34645aeb42
commit
45fdd034ce
1 changed files with 52 additions and 13 deletions
|
@ -989,43 +989,82 @@ static int zend_update_parent_ce(zval *zv)
|
||||||
|
|
||||||
/* update methods */
|
/* update methods */
|
||||||
if (ce->constructor) {
|
if (ce->constructor) {
|
||||||
ce->constructor = zend_shared_alloc_get_xlat_entry(ce->constructor);
|
zend_function *tmp = zend_shared_alloc_get_xlat_entry(ce->constructor);
|
||||||
|
if (tmp != NULL) {
|
||||||
|
ce->constructor = tmp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ce->destructor) {
|
if (ce->destructor) {
|
||||||
ce->destructor = zend_shared_alloc_get_xlat_entry(ce->destructor);
|
zend_function *tmp = zend_shared_alloc_get_xlat_entry(ce->destructor);
|
||||||
|
if (tmp != NULL) {
|
||||||
|
ce->destructor = tmp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ce->clone) {
|
if (ce->clone) {
|
||||||
ce->clone = zend_shared_alloc_get_xlat_entry(ce->clone);
|
zend_function *tmp = zend_shared_alloc_get_xlat_entry(ce->clone);
|
||||||
|
if (tmp != NULL) {
|
||||||
|
ce->clone = tmp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ce->__get) {
|
if (ce->__get) {
|
||||||
ce->__get = zend_shared_alloc_get_xlat_entry(ce->__get);
|
zend_function *tmp = zend_shared_alloc_get_xlat_entry(ce->__get);
|
||||||
|
if (tmp != NULL) {
|
||||||
|
ce->__get = tmp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ce->__set) {
|
if (ce->__set) {
|
||||||
ce->__set = zend_shared_alloc_get_xlat_entry(ce->__set);
|
zend_function *tmp = zend_shared_alloc_get_xlat_entry(ce->__set);
|
||||||
|
if (tmp != NULL) {
|
||||||
|
ce->__set = tmp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ce->__call) {
|
if (ce->__call) {
|
||||||
ce->__call = zend_shared_alloc_get_xlat_entry(ce->__call);
|
zend_function *tmp = zend_shared_alloc_get_xlat_entry(ce->__call);
|
||||||
|
if (tmp != NULL) {
|
||||||
|
ce->__call = tmp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ce->serialize_func) {
|
if (ce->serialize_func) {
|
||||||
ce->serialize_func = zend_shared_alloc_get_xlat_entry(ce->serialize_func);
|
zend_function *tmp = zend_shared_alloc_get_xlat_entry(ce->serialize_func);
|
||||||
|
if (tmp != NULL) {
|
||||||
|
ce->serialize_func = tmp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ce->unserialize_func) {
|
if (ce->unserialize_func) {
|
||||||
ce->unserialize_func = zend_shared_alloc_get_xlat_entry(ce->unserialize_func);
|
zend_function *tmp = zend_shared_alloc_get_xlat_entry(ce->unserialize_func);
|
||||||
|
if (tmp != NULL) {
|
||||||
|
ce->unserialize_func = tmp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ce->__isset) {
|
if (ce->__isset) {
|
||||||
ce->__isset = zend_shared_alloc_get_xlat_entry(ce->__isset);
|
zend_function *tmp = zend_shared_alloc_get_xlat_entry(ce->__isset);
|
||||||
|
if (tmp != NULL) {
|
||||||
|
ce->__isset = tmp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ce->__unset) {
|
if (ce->__unset) {
|
||||||
ce->__unset = zend_shared_alloc_get_xlat_entry(ce->__unset);
|
zend_function *tmp = zend_shared_alloc_get_xlat_entry(ce->__unset);
|
||||||
|
if (tmp != NULL) {
|
||||||
|
ce->__unset = tmp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ce->__tostring) {
|
if (ce->__tostring) {
|
||||||
ce->__tostring = zend_shared_alloc_get_xlat_entry(ce->__tostring);
|
zend_function *tmp = zend_shared_alloc_get_xlat_entry(ce->__tostring);
|
||||||
|
if (tmp != NULL) {
|
||||||
|
ce->__tostring = tmp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ce->__callstatic) {
|
if (ce->__callstatic) {
|
||||||
ce->__callstatic = zend_shared_alloc_get_xlat_entry(ce->__callstatic);
|
zend_function *tmp = zend_shared_alloc_get_xlat_entry(ce->__callstatic);
|
||||||
|
if (tmp != NULL) {
|
||||||
|
ce->__callstatic = tmp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ce->__debugInfo) {
|
if (ce->__debugInfo) {
|
||||||
ce->__debugInfo = zend_shared_alloc_get_xlat_entry(ce->__debugInfo);
|
zend_function *tmp = zend_shared_alloc_get_xlat_entry(ce->__debugInfo);
|
||||||
|
if (tmp != NULL) {
|
||||||
|
ce->__debugInfo = tmp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// zend_hash_apply(&ce->properties_info, (apply_func_t) zend_update_property_info_ce);
|
// zend_hash_apply(&ce->properties_info, (apply_func_t) zend_update_property_info_ce);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue