summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-04-01 14:19:43 +0400
committerDmitry Stogov <dmitry@zend.com>2014-04-01 14:19:43 +0400
commit9b196ca6e872369263c55e66ceca0183f75d6420 (patch)
tree68266c9cfbc2c7602cc938ddb31aed5bcd54995b
parent98ca90c91095d13bad7e9f17d89c3fc0abdbc4be (diff)
downloadphp-git-9b196ca6e872369263c55e66ceca0183f75d6420.tar.gz
Added check for interned strings
-rw-r--r--Zend/zend_compile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 9ba40dfc33..8dcaf29cdc 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -3871,6 +3871,7 @@ static zend_bool do_inherit_constant_check(HashTable *child_constants_table, con
(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_TYPE_P(old_constant) == IS_STRING && Z_STR_P(old_constant) != Z_STR_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);
}