summaryrefslogtreecommitdiff
path: root/ext/standard/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/array.c')
-rw-r--r--ext/standard/array.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c
index ec544911f1..a1c0df8c0d 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -969,9 +969,7 @@ static int php_array_walk(HashTable *target_hash, zval **userdata TSRMLS_DC)
Z_TYPE_P(key) = IS_LONG;
Z_LVAL_P(key) = num_key;
} else {
- Z_TYPE_P(key) = IS_STRING;
- Z_STRVAL_P(key) = string_key;
- Z_STRLEN_P(key) = string_key_len-1;
+ ZVAL_STRINGL(key, string_key, string_key_len-1, 1);
}
/* Call the userland function */