summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2005-06-02 15:42:58 +0000
committerAntony Dovgal <tony2001@php.net>2005-06-02 15:42:58 +0000
commit473e88e57418ebf6ee87e1035a97b52d1a0e8902 (patch)
tree0f980985c8993346a23df3a632548d0a8e7b0f36
parent5955cb64bbc67e375eabf603dd7a17c39a852306 (diff)
downloadphp-git-473e88e57418ebf6ee87e1035a97b52d1a0e8902.tar.gz
MFH: fix bug #33214 (odbc_next_result does not signal SQL errors with 2-statement SQL batches).
Path by rich at kastle dot com.
-rw-r--r--NEWS2
-rw-r--r--ext/odbc/php_odbc.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 44fd1911a6..00976483c3 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,8 @@ PHP 4 NEWS
- Changed sha1_file() and md5_file() functions to use streams instead of
low level IO. (Uwe)
- 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)
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c
index a053e99f45..cd25df9d46 100644
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@ -2436,8 +2436,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;
}
}