From c218f629202cfc618d84dff6a5573e81c7f60540 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Tue, 21 Jan 2025 19:20:57 +0100 Subject: [PATCH] Remove always-true check in pdo_stmt.c (#17535) `check_empty` is checked earlier up, so this variable is always true. --- ext/pdo/pdo_stmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 0c115c24cf2..dc0b952a86f 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -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 {