From: Felipe Pena Date: Tue, 20 Jan 2009 20:02:37 +0000 (+0000) Subject: - Fixed bug #47087 (Second parameter of mssql_fetch_array() is ignored) X-Git-Tag: php-5.4.0alpha1~191^2~4447 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=798f7b7088680ff51f04109c82e2f7b5562f0b81;p=php - Fixed bug #47087 (Second parameter of mssql_fetch_array() is ignored) --- diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c index c0fa4e879a..0462947611 100644 --- a/ext/mssql/php_mssql.c +++ b/ext/mssql/php_mssql.c @@ -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);