From 4b9ebd837b6fc20bd907ae858375737e91365ede Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 11 Sep 2019 15:31:04 +0200 Subject: Allow throwing exception while loading parent class This is a fix for symfony/symfony#32995. The behavior is: * Throwing exception when loading parent/interface is allowed (and we will also throw one if the class is simply not found). * If this happens, the bucket key for the class is reset, so it's possibly to try registering the same class again. * However, if the class has already been used due to a variance obligation, the exception is upgraded to a fatal error, as we cannot safely unregister the class stub anymore. --- Zend/zend_compile.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Zend/zend_compile.h') diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index 2a8ac77145..f82507c88c 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -229,7 +229,7 @@ typedef struct _zend_oparray_context { /* op_array or class is preloaded | | | */ #define ZEND_ACC_PRELOADED (1 << 10) /* X | X | | */ /* | | | */ -/* Class Flags (unused: 23...) | | | */ +/* Class Flags (unused: 24...) | | | */ /* =========== | | | */ /* | | | */ /* Special class types | | | */ @@ -281,6 +281,9 @@ typedef struct _zend_oparray_context { /* Class is linked apart from variance obligations. | | | */ #define ZEND_ACC_NEARLY_LINKED (1 << 22) /* X | | | */ /* | | | */ +/* Whether this class was used in its unlinked state. | | | */ +#define ZEND_ACC_HAS_UNLINKED_USES (1 << 23) /* X | | | */ +/* | | | */ /* Function Flags (unused: 23, 26) | | | */ /* ============== | | | */ /* | | | */ -- cgit v1.2.1