Skip to content

Commit ebda1e8

Browse files
committed
Move condition
1 parent 63f76a6 commit ebda1e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/standard/string.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2410,14 +2410,14 @@ PHP_FUNCTION(substr_replace)
24102410
zend_string *orig_str = zval_get_tmp_string(tmp_str, &tmp_orig_str);
24112411

24122412
if (from_ht) {
2413+
if (HT_IS_PACKED(from_ht)) {
24132414
while (from_idx < from_ht->nNumUsed) {
24142415
tmp_from = &from_ht->arPacked[from_idx];
24152416
if (Z_TYPE_P(tmp_from) != IS_UNDEF) {
24162417
break;
24172418
}
24182419
from_idx++;
24192420
}
2420-
if (HT_IS_PACKED(from_ht)) {
24212421
} else {
24222422
while (from_idx < from_ht->nNumUsed) {
24232423
tmp_from = &from_ht->arData[from_idx].val;

0 commit comments

Comments
 (0)