From 766b688c8eec70adf02bcfe0c059259d16f3d363 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Wed, 20 Feb 2008 03:12:16 +0000 Subject: [PATCH] MFB: Fixed bug #44171 (Invalid FETCH_COLUMN index does not raise an error) --- NEWS | 1 + ext/pdo/pdo_stmt.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/NEWS b/NEWS index 16a8631a36..b720bf12f7 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,7 @@ PHP NEWS which to group by data is specified. (Ilia) - Upgraded PCRE to version 7.6 (Nuno) +- Fixed bug #44171 (Invalid FETCH_COLUMN index does not raise an error). (Ilia) - Fixed Bug #44159 (Crash: $pdo->setAttribute(PDO::STATEMENT_ATTR_CLASS, NULL)). (Felipe) - Fixed bug #44069 (Huge memory usage with concatenation using . instead of diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 763360fa92..eac65790cf 100755 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -965,6 +965,8 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value, } else { break; } + } else { + pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "Invalid column index" TSRMLS_CC); } return 0; -- 2.50.1