]> granicus.if.org Git - php/commitdiff
MFH: fix bug #30430 (odbc_next_result() doesn't bind values and that results in segfault)
authorAntony Dovgal <tony2001@php.net>
Tue, 18 Jan 2005 15:07:10 +0000 (15:07 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 18 Jan 2005 15:07:10 +0000 (15:07 +0000)
fix protos

NEWS
ext/odbc/php_odbc.c

diff --git a/NEWS b/NEWS
index 95fa7802e8c99b13efc0b06b5dd715d5c591ad9a..2c73c02905bcd5454989fba19c8bb568f6055ad6 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -33,6 +33,8 @@ PHP                                                                        NEWS
   path of the request URI). (kameshj at fastmail dot fm)
 - Fixed bug #30726 (-.1 like numbers are not being handled correctly). (Ilia)
 - Fixed bug #30446 (apache2handler: virtual() includes files out of sequence)
+- Fixed bug #30430 (odbc_next_result() doesn't bind values and that results 
+  in segfault). (pdan-php at esync dot org, Tony)
 - Fixed bug #30120 (imagettftext() and imagettfbbox() accept too many
   parameters). (Jani)
 - Fixed bug #28930 (PHP sources pick wrong header files generated by bison).
index 34b40ee39e13c57d36c70264db7da4fbdac8fecc..10934a89a498de592008a9d3fe5c5e61681a53cd 100644 (file)
@@ -2423,10 +2423,7 @@ PHP_FUNCTION(odbc_next_result)
 
        result->fetched = 0;
        rc = SQLMoreResults(result->stmt);
-       if (rc == SQL_SUCCESS) {
-               RETURN_TRUE;
-       }
-       else if (rc == SQL_SUCCESS_WITH_INFO) {
+       if (rc == SQL_SUCCESS_WITH_INFO || rc == SQL_SUCCESS) {
                rc = SQLFreeStmt(result->stmt, SQL_UNBIND);
                SQLNumParams(result->stmt, &(result->numparams));
                SQLNumResultCols(result->stmt, &(result->numcols));
@@ -2767,7 +2764,7 @@ PHP_FUNCTION(odbc_setoption)
  * metadata functions
  */
 
-/* {{{ proto resource odbc_tables(resource connection_id [, string qualifier, string owner, string name, string table_types])
+/* {{{ proto resource odbc_tables(resource connection_id [, string qualifier [, string owner [, string name [, string table_types]]]])
    Call the SQLTables function */
 PHP_FUNCTION(odbc_tables)
 {
@@ -2846,7 +2843,7 @@ PHP_FUNCTION(odbc_tables)
 }
 /* }}} */
 
-/* {{{ proto resource odbc_columns(resource connection_id, string qualifier, string owner, string table_name, string column_name)
+/* {{{ proto resource odbc_columns(resource connection_id [, string qualifier [, string owner [, string table_name [, string column_name]]]])
    Returns a result identifier that can be used to fetch a list of column names in specified tables */
 PHP_FUNCTION(odbc_columns)
 {