We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55c0091 commit 7b2f216Copy full SHA for 7b2f216
ext/standard/array.c
@@ -2876,6 +2876,18 @@ static void php_array_data_shuffle(zval *array) /* {{{ */
2876
n_left = n_elems;
2877
2878
if (!HT_IS_PACKED(hash)) {
2879
+ if (!HT_HAS_STATIC_KEYS_ONLY(hash)) {
2880
+ Bucket *p = hash->arData;
2881
+ uint32_t i = hash->nNumUsed;
2882
+
2883
+ for (; i > 0; p++, i--) {
2884
+ if (Z_ISUNDEF(p->val)) continue;
2885
+ if (p->key) {
2886
+ zend_string_release(p->key);
2887
+ p->key = NULL;
2888
+ }
2889
2890
2891
zend_hash_to_packed(hash);
2892
}
2893
0 commit comments