summaryrefslogtreecommitdiff
path: root/ext/spl/spl_array.c
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2007-03-20 20:28:08 +0000
committerMarcus Boerger <helly@php.net>2007-03-20 20:28:08 +0000
commit4c1c431a38aebd63ffb0dbf596d12afe4d0974cf (patch)
treedac879efad5b23df323996c534549108c934e444 /ext/spl/spl_array.c
parent6081c2284e35b2678796ea7bdd6b63fce2fee22d (diff)
downloadphp-git-4c1c431a38aebd63ffb0dbf596d12afe4d0974cf.tar.gz
- MFH Fix Bug #40872 (inconsistency in offsetSet, offsetExists treatment
of string enclosed integers)
Diffstat (limited to 'ext/spl/spl_array.c')
-rwxr-xr-xext/spl/spl_array.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c
index 419eb52e38..fec74f57f9 100755
--- a/ext/spl/spl_array.c
+++ b/ext/spl/spl_array.c
@@ -456,7 +456,7 @@ static int spl_array_has_dimension_ex(int check_inherited, zval *object, zval *o
{
spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC);
long index;
- zval *rv;
+ zval *rv, **tmp;
if (check_inherited && intern->fptr_offset_has) {
SEPARATE_ARG_IF_REF(offset);
@@ -475,9 +475,7 @@ static int spl_array_has_dimension_ex(int check_inherited, zval *object, zval *o
switch(Z_TYPE_P(offset)) {
case IS_STRING:
if (check_empty) {
- zval **tmp;
- HashTable *ht = spl_array_get_hash_table(intern, 0 TSRMLS_CC);
- if (zend_hash_find(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, (void **) &tmp) != FAILURE && zend_is_true(*tmp)) {
+ if (zend_symtable_find(spl_array_get_hash_table(intern, 0 TSRMLS_CC), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, (void **) &tmp) != FAILURE && zend_is_true(*tmp)) {
return 1;
}
return 0;