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

index 0167ea34276297d4fde36869c95daf9c553fd2a8..45b1b6c0e357c095b700ad839946a08611120524 100755 (executable)
@@ -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;