From: Antony Dovgal Date: Thu, 8 Jan 2009 22:35:30 +0000 (+0000) Subject: use correct check for constants and stop segfaulting X-Git-Tag: php-5.4.0alpha1~191^2~4583 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e9606d2cf22cf79dd9dad9e464569e74c81a939;p=php use correct check for constants and stop segfaulting --- diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 7ddbf7b037..f12b6ec523 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -4868,7 +4868,7 @@ void zend_do_declare_stmt(znode *var, znode *val TSRMLS_DC) /* {{{ */ } else if (UG(unicode) && ZEND_U_EQUAL(Z_TYPE(var->u.constant), Z_UNIVAL(var->u.constant), Z_UNILEN(var->u.constant), "encoding", sizeof("encoding")-1)) { UErrorCode status = U_ZERO_ERROR; - if (Z_TYPE(val->u.constant) == IS_CONSTANT) { + if ((Z_TYPE(val->u.constant) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT) { zend_error(E_COMPILE_ERROR, "Cannot use constants as encoding"); } /*