Do not report MINIT stage internal class aliases in extensions

Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
This commit is contained in:
Bob Weinand 2022-11-09 16:36:05 +01:00
parent 4b1feda574
commit 182314c317

View File

@ -3281,7 +3281,10 @@ ZEND_API zend_result zend_register_class_alias_ex(const char *name, size_t name_
if (!(ce->ce_flags & ZEND_ACC_IMMUTABLE)) {
ce->refcount++;
}
zend_observer_class_linked_notify(ce, lcname);
// avoid notifying at MINIT time
if (ce->type == ZEND_USER_CLASS) {
zend_observer_class_linked_notify(ce, lcname);
}
return SUCCESS;
}
return FAILURE;