diff options
Diffstat (limited to 'Zend/zend_constants.c')
-rw-r--r-- | Zend/zend_constants.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c index f5a71ac6cc..100d0a263b 100644 --- a/Zend/zend_constants.c +++ b/Zend/zend_constants.c @@ -348,7 +348,7 @@ ZEND_API zval *zend_get_constant_ex(zend_string *cname, zend_class_entry *scope, } } - if (ret_constant && Z_CONSTANT_P(ret_constant)) { + if (ret_constant && Z_TYPE_P(ret_constant) == IS_CONSTANT_AST) { if (Z_TYPE_P(ret_constant) == IS_CONSTANT_AST) { if (IS_CONSTANT_VISITED(ret_constant)) { zend_throw_error(NULL, "Cannot declare self-referencing constant '%s::%s'", ZSTR_VAL(class_name), ZSTR_VAL(constant_name)); |