Skip to content

Commit f0858d8

Browse files
committed
Record warnings during early binding
These should also get replayed when the class is loaded from opcache.
1 parent 3b7edb6 commit f0858d8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Zend/zend_inheritance.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2960,6 +2960,10 @@ zend_class_entry *zend_try_early_bind(zend_class_entry *ce, zend_class_entry *pa
29602960
orig_linking_class = CG(current_linking_class);
29612961
CG(current_linking_class) = is_cacheable ? ce : NULL;
29622962

2963+
if (is_cacheable) {
2964+
zend_begin_record_errors();
2965+
}
2966+
29632967
zend_do_inheritance_ex(ce, parent_ce, status == INHERITANCE_SUCCESS);
29642968
if (parent_ce && parent_ce->num_interfaces) {
29652969
zend_do_inherit_interfaces(ce, parent_ce);
@@ -2972,6 +2976,7 @@ zend_class_entry *zend_try_early_bind(zend_class_entry *ce, zend_class_entry *pa
29722976
ce->ce_flags |= ZEND_ACC_LINKED;
29732977

29742978
CG(current_linking_class) = orig_linking_class;
2979+
EG(record_errors) = false;
29752980

29762981
if (is_cacheable) {
29772982
HashTable *ht = (HashTable*)ce->inheritance_cache;

0 commit comments

Comments
 (0)