summaryrefslogtreecommitdiff
path: root/ext/standard/array.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-09-29 11:17:43 +0300
committerDmitry Stogov <dmitry@zend.com>2015-09-29 11:17:43 +0300
commit560e4fa39327e952652b6469d9644fc5fa2c15fa (patch)
treeb91589369c569d8efe84785303b58ad0fdd17c18 /ext/standard/array.c
parent617bef558bbc8e2dd7682d9f407963b4a88092eb (diff)
downloadphp-git-560e4fa39327e952652b6469d9644fc5fa2c15fa.tar.gz
Removed or simplified incorrect SEPARATE_*() macros usage.
Diffstat (limited to 'ext/standard/array.c')
-rw-r--r--ext/standard/array.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c
index 59e957d3cd..b9d39ea1a2 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -1455,12 +1455,9 @@ static int php_array_walk(HashTable *target_hash, zval *userdata, int recursive)
zend_fcall_info orig_array_walk_fci;
zend_fcall_info_cache orig_array_walk_fci_cache;
- if (Z_ISREF_P(zv)) {
- thash = Z_ARRVAL_P(Z_REFVAL_P(zv));
- } else {
- SEPARATE_ZVAL(zv);
- thash = Z_ARRVAL_P(zv);
- }
+ ZVAL_DEREF(zv);
+ SEPARATE_ARRAY(zv);
+ thash = Z_ARRVAL_P(zv);
if (thash->u.v.nApplyCount > 1) {
php_error_docref(NULL, E_WARNING, "recursion detected");
if (userdata) {