diff options
author | Antony Dovgal <tony2001@php.net> | 2005-06-02 15:42:58 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2005-06-02 15:42:58 +0000 |
commit | 473e88e57418ebf6ee87e1035a97b52d1a0e8902 (patch) | |
tree | 0f980985c8993346a23df3a632548d0a8e7b0f36 | |
parent | 5955cb64bbc67e375eabf603dd7a17c39a852306 (diff) | |
download | php-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-- | NEWS | 2 | ||||
-rw-r--r-- | ext/odbc/php_odbc.c | 6 |
2 files changed, 6 insertions, 2 deletions
@@ -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; } } |