summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/standard/array.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c
index 471ba56aa2..0b50cf3cb0 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -3229,6 +3229,9 @@ PHP_FUNCTION(array_unique)
for (idx = 0; idx < i; idx++) {
cmpdata = &arTmp[idx];
if (Z_TYPE(cmpdata->b.val) != IS_UNDEF) {
+#if 1
+ continue;
+#else
if (lastkept == NULL) {
lastkept = cmpdata;
continue;
@@ -3244,13 +3247,14 @@ PHP_FUNCTION(array_unique)
p = &cmpdata->b;
}
}
+#endif
} else {
p = &cmpdata->b;
}
if (p->key == NULL) {
zend_hash_index_del(Z_ARRVAL_P(return_value), p->h);
} else {
- zend_hash_del(Z_ARRVAL_P(return_value), p->key);
+ zend_hash_del(Z_ARRVAL_P(return_value), p->key);
}
}
pefree(arTmp, Z_ARRVAL_P(array)->u.flags & HASH_FLAG_PERSISTENT);