]> granicus.if.org Git - php/commitdiff
- Fixed bug #47087 (Second parameter of mssql_fetch_array() is ignored)
authorFelipe Pena <felipe@php.net>
Tue, 20 Jan 2009 20:02:37 +0000 (20:02 +0000)
committerFelipe Pena <felipe@php.net>
Tue, 20 Jan 2009 20:02:37 +0000 (20:02 +0000)
ext/mssql/php_mssql.c

index c0fa4e879a63be1b7d2238c3bdcc3fa0d4a7d454..0462947611f474d1e1fafa096d638a0faf7581d9 100644 (file)
@@ -1479,6 +1479,7 @@ static void php_mssql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
                        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &mssql_result_index, &resulttype) == FAILURE) {
                                return;
                        }
+                       result_type = (resulttype > 0 && (resulttype & MSSQL_BOTH)) ? resulttype : result_type;
                        break;
                default:
                        return;
@@ -1552,8 +1553,8 @@ PHP_FUNCTION(mssql_fetch_row)
 }
 /* }}} */
 
-/* {{{ proto object mssql_fetch_object(resource result_id [, int result_type])
-   Returns a psuedo-object of the current row in the result set specified by result_id */
+/* {{{ proto object mssql_fetch_object(resource result_id)
+   Returns a pseudo-object of the current row in the result set specified by result_id */
 PHP_FUNCTION(mssql_fetch_object)
 {
        php_mssql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, MSSQL_ASSOC);