]> granicus.if.org Git - php/commitdiff
MFB: Fixed bug #44171 (Invalid FETCH_COLUMN index does not raise an error)
authorIlia Alshanetsky <iliaa@php.net>
Wed, 20 Feb 2008 03:12:23 +0000 (03:12 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 20 Feb 2008 03:12:23 +0000 (03:12 +0000)
ext/pdo/pdo_stmt.c

index 3a51da78aa2c92bfaddeda0af877077c1ea3735b..2b9ff4f26d8c51fae7e4ecb7ddba3b24f887991a 100755 (executable)
@@ -936,6 +936,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;