From 2e61775e05492a4314e6941274affc7e732d40d5 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Tue, 3 Mar 2026 15:46:09 +0100 Subject: [PATCH] Fix PDOStatement::getIterator() not throwing when parameters are provided --- NEWS | 4 ++++ ext/pdo/pdo_stmt.c | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index a990068937e70..59f96855b9468 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,10 @@ PHP NEWS . Fixed re-entrancy issue on php_pcre_match_impl, php_pcre_replace_impl, php_pcre_split_impl, and php_pcre_grep_impl. (David Carlier) +- PDO: + . Fixed PDOStatement::getIterator() not throwing when parameters are + provided. (alexandre-daubois) + - Standard: . Fixed bug GH-20906 (Assertion failure when messing up output buffers). (ndossche) diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 9ba82e822b676..30dfb4387a036 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -2022,9 +2022,7 @@ PHP_METHOD(PDOStatement, debugDumpParams) PHP_METHOD(PDOStatement, getIterator) { - if (zend_parse_parameters_none() == FAILURE) { - return; - } + ZEND_PARSE_PARAMETERS_NONE(); zend_create_internal_iterator_zval(return_value, ZEND_THIS); }