Skip to content

Commit a843c8a

Browse files
committed
Fix crash during default value evaluation
1 parent 9619562 commit a843c8a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Zend/zend_compile.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1512,6 +1512,11 @@ static bool zend_try_ct_eval_const(zval *zv, zend_string *name, bool is_fully_qu
15121512

15131513
static inline bool zend_is_scope_known() /* {{{ */
15141514
{
1515+
if (!CG(active_op_array)) {
1516+
/* This can only happen when evaluating a default value string. */
1517+
return 0;
1518+
}
1519+
15151520
if (CG(active_op_array)->fn_flags & ZEND_ACC_CLOSURE) {
15161521
/* Closures can be rebound to a different scope */
15171522
return 0;

0 commit comments

Comments
 (0)