]> granicus.if.org Git - php/commitdiff
MFH: fix bug #33214 (odbc_next_result does not signal SQL errors with 2-statement...
authorAntony Dovgal <tony2001@php.net>
Thu, 2 Jun 2005 15:42:44 +0000 (15:42 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 2 Jun 2005 15:42:44 +0000 (15:42 +0000)
Path by rich at kastle dot com.

NEWS
ext/odbc/php_odbc.c

diff --git a/NEWS b/NEWS
index bb3c2d8ccb85c2d3a5d1ae03b10ab59e91259afd..7b68487337ba70f3f7bfe2c089d344be35454455 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,8 @@ PHP                                                                        NEWS
   of type (MEDIUM|LONG)BLOB/(MEDIUM|LONG)TEXT. (Andrey)
 - Fixed memory corruption in ImageTTFText() with 64bit systems. (Andrey)
 - Fixed memory corruption in stristr(). (Derick)
+- Fixed bug #33214 (odbc_next_result does not signal SQL errors with 
+  2-statement SQL batches). (rich at kastle dot com, Tony)
 - Fixed bug #33210 (relax jpeg recursive loop protection). (Ilia)
 - Fixed bug #33200 (preg_replace(): magic_quotes_sybase=On makes 'e' modifier
   misbehave). (Jani)
index 10934a89a498de592008a9d3fe5c5e61681a53cd..3a4813bec813657f95bfe5c361a6103c718d89fa 100644 (file)
@@ -2437,8 +2437,10 @@ PHP_FUNCTION(odbc_next_result)
                        result->values = NULL;
                }
                RETURN_TRUE;
-       }
-       else {
+       } else if (rc == SQL_NO_DATA_FOUND) {
+               RETURN_FALSE;
+       } else {
+               odbc_sql_error(result->conn_ptr, result->stmt, "SQLMoreResults");
                RETURN_FALSE;
        }
 }