summaryrefslogtreecommitdiff
path: root/Zend/zend_inheritance.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-05-22 11:13:28 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-05-23 10:41:10 +0200
commit64918c770282c0f60b407e8de3201a6b68c88e78 (patch)
treee9d8fa1e7ad2f07729f6aacf4f5ac7747bd74339 /Zend/zend_inheritance.c
parentfdb7fc6153cfa8788d11e3dc74bc4f899bcdd42a (diff)
downloadphp-git-64918c770282c0f60b407e8de3201a6b68c88e78.tar.gz
Forbid use of not fully linked classes
Diffstat (limited to 'Zend/zend_inheritance.c')
-rw-r--r--Zend/zend_inheritance.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c
index 6ae32e5625..3f07fb46e8 100644
--- a/Zend/zend_inheritance.c
+++ b/Zend/zend_inheritance.c
@@ -2018,7 +2018,7 @@ void zend_verify_abstract_class(zend_class_entry *ce) /* {{{ */
ZEND_API void zend_do_link_class(zend_class_entry *ce, zend_class_entry *parent) /* {{{ */
{
- ce->ce_flags |= ZEND_ACC_LINKED;
+ ce->ce_flags |= ZEND_ACC_LINKING_IN_PROGRESS;
if (parent) {
zend_do_inheritance(ce, parent);
}
@@ -2033,5 +2033,7 @@ ZEND_API void zend_do_link_class(zend_class_entry *ce, zend_class_entry *parent)
}
zend_build_properties_info_table(ce);
+ ce->ce_flags &= ~ZEND_ACC_LINKING_IN_PROGRESS;
+ ce->ce_flags |= ZEND_ACC_LINKED;
}
/* }}} */