1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Remove always-true check in pdo_stmt.c (#17535)

`check_empty` is checked earlier up, so this variable is always true.
This commit is contained in:
Niels Dossche
2025-01-21 19:20:57 +01:00
committed by GitHub
parent 1aaf2b1899
commit c218f62920

View File

@@ -2360,7 +2360,7 @@ static int row_dim_exists(zend_object *object, zval *offset, int check_empty)
return false;
}
ZEND_ASSERT(retval == &tmp_val);
bool res = check_empty ? i_zend_is_true(retval) : Z_TYPE(tmp_val) != IS_NULL;
bool res = i_zend_is_true(retval);
zval_ptr_dtor_nogc(retval);
return res;
} else {