From: Ilia Alshanetsky Date: Wed, 20 Feb 2008 03:12:16 +0000 (+0000) Subject: MFB: Fixed bug #44171 (Invalid FETCH_COLUMN index does not raise an error) X-Git-Tag: php-5.2.6RC1~40 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=766b688c8eec70adf02bcfe0c059259d16f3d363;p=php MFB: Fixed bug #44171 (Invalid FETCH_COLUMN index does not raise an error) --- 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;