diff options
author | Dmitry Stogov <dmitry@php.net> | 2005-12-05 08:56:32 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2005-12-05 08:56:32 +0000 |
commit | 7aaff40de5a1dd73186bc4e13dcf10ae2dbf3313 (patch) | |
tree | 953253fbda42a368b991867851911358e8ffe9ee /Zend/zend_execute_API.c | |
parent | f9e209f048c60b167881417349eb04fb490d7e3d (diff) | |
download | php-git-7aaff40de5a1dd73186bc4e13dcf10ae2dbf3313.tar.gz |
Fixed bug #35509 (string constant as array key has different behavior inside object)
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r-- | Zend/zend_execute_API.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 25e828c44e..5aecf8671f 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -523,28 +523,10 @@ ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC) *element = new_val; switch (const_value.type) { - case IS_STRING: { - long lval; - double dval; - - if (is_numeric_string(Z_STRVAL(const_value), Z_STRLEN(const_value), &lval, &dval, 0) == IS_LONG) { - zend_hash_update_current_key(p->value.ht, HASH_KEY_IS_LONG, NULL, 0, lval); - } else { - zend_hash_update_current_key(p->value.ht, HASH_KEY_IS_STRING, Z_STRVAL(const_value), Z_STRLEN(const_value)+1, 0); - } + case IS_STRING: + case IS_UNICODE: + zend_u_symtable_update_current_key(p->value.ht, Z_TYPE(const_value), Z_UNIVAL(const_value), Z_UNILEN(const_value)+1); break; - } - case IS_UNICODE: { - long lval; - double dval; - - if (is_numeric_unicode(Z_USTRVAL(const_value), Z_USTRLEN(const_value), &lval, &dval, 0) == IS_LONG) { - zend_hash_update_current_key(p->value.ht, HASH_KEY_IS_LONG, NULL, 0, lval); - } else { - zend_hash_update_current_key(p->value.ht, HASH_KEY_IS_UNICODE, Z_USTRVAL(const_value), Z_USTRLEN(const_value)+1, 0); - } - break; - } case IS_BINARY: zend_hash_update_current_key(p->value.ht, HASH_KEY_IS_BINARY, Z_STRVAL(const_value), Z_STRLEN(const_value)+1, 0); break; |