com php-src: I don't know how to fix it: Zend/zend_compile. c

From: Date: Thu, 27 Feb 2014 19:51:00 +0000
Subject: com php-src: I don't know how to fix it: Zend/zend_compile. c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-77864@lists.php.net to get a copy of this message
Commit: cb181c512ad5e4babe9e481d8d06080ae6be4f6d Author: Dmitry Stogov <dmitry@zend.com> Thu, 27 Feb 2014 23:51:00 +0400 Parents: 3960b0acc4c2f86ea799de151b82ae58022cf29a Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=cb181c512ad5e4babe9e481d8d06080ae6be4f6d Log: I don't know how to fix it Changed paths: M Zend/zend_compile.c Diff: diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 50283d1..c370a05 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -3865,7 +3865,13 @@ static zend_bool do_inherit_constant_check(HashTable *child_constants_table, con zval *old_constant; if ((old_constant = zend_hash_find(child_constants_table, hash_key->key)) != NULL) { - if (old_constant != parent_constant) { +//??? if (old_constant != parent_constant) { +//??? see Zend/tests/errmsg_025.phpt + if ((Z_TYPE_P(old_constant) != Z_TYPE_P(parent_constant)) || + (Z_TYPE_P(old_constant) == IS_LONG && Z_LVAL_P(old_constant) != Z_LVAL_P(parent_constant)) || + (Z_TYPE_P(old_constant) == IS_BOOL && Z_LVAL_P(old_constant) != Z_LVAL_P(parent_constant)) || + (Z_TYPE_P(old_constant) == IS_DOUBLE && Z_DVAL_P(old_constant) != Z_DVAL_P(parent_constant)) || + (Z_REFCOUNTED_P(old_constant) && Z_COUNTED_P(old_constant) != Z_COUNTED_P(parent_constant))) { zend_error_noreturn(E_COMPILE_ERROR, "Cannot inherit previously-inherited or override constant %s from interface %s", hash_key->key->val, iface->name->val); } return 0;

« previous php.cvs (#77864) next »