Skip to content

Commit d0d2884

Browse files
committed
ext/mysqli: Use an assertion for condition that is checked by ZPP
1 parent 2897919 commit d0d2884

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ext/mysqli/mysqli_nonapi.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -640,9 +640,7 @@ static zend_result mysqlnd_zval_array_to_mysqlnd_array(zval *in_array, MYSQLND *
640640
zval *elem;
641641
int i = 0, current = 0;
642642

643-
if (Z_TYPE_P(in_array) != IS_ARRAY) {
644-
return SUCCESS;
645-
}
643+
ZEND_ASSERT(Z_TYPE_P(in_array) == IS_ARRAY);
646644
*out_array = ecalloc(zend_hash_num_elements(Z_ARRVAL_P(in_array)) + 1, sizeof(MYSQLND *));
647645
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(in_array), elem) {
648646
i++;

0 commit comments

Comments
 (0)