Skip to content

Commit aa125c8

Browse files
committed
Review fixes
1 parent 5c4ef9a commit aa125c8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ext/standard/array.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,11 @@ static zend_always_inline int php_array_key_compare_unstable_i(Bucket *f, Bucket
169169
zval first;
170170
zval second;
171171

172+
if (f->key == NULL && s->key == NULL) {
173+
return (zend_long)f->h > (zend_long)s->h ? 1 : -1;
174+
} else if (f->key && s->key) {
175+
return zendi_smart_strcmp(f->key, s->key);
176+
}
172177
if (f->key) {
173178
ZVAL_STR(&first, f->key);
174179
} else {

0 commit comments

Comments
 (0)