Skip to content

Commit 7720286

Browse files
committed
Must check that the class table is ready for lookups
1 parent 50374cb commit 7720286

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Zend/zend_inheritance.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,12 @@ static bool class_visible(zend_class_entry *ce) {
203203
static zend_class_entry *lookup_class(
204204
zend_class_entry *scope, zend_string *name, bool register_unresolved) {
205205
uint32_t flags = ZEND_FETCH_CLASS_ALLOW_UNLINKED | ZEND_FETCH_CLASS_NO_AUTOLOAD;
206-
zend_class_entry *ce = zend_lookup_class_ex(name, NULL, flags);
206+
zend_class_entry *ce = NULL;
207+
208+
if (EG(class_table)) {
209+
ce = zend_lookup_class_ex(name, NULL, flags);
210+
}
211+
207212
if (!CG(in_compilation)) {
208213
if (ce) {
209214
return ce;

0 commit comments

Comments
 (0)