]> granicus.if.org Git - php/commitdiff
MFH: plug leak on invalid result type
authorAntony Dovgal <tony2001@php.net>
Thu, 8 Nov 2007 13:29:06 +0000 (13:29 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 8 Nov 2007 13:29:06 +0000 (13:29 +0000)
ext/mysql/php_mysql.c

index 01d843b5e904b315644dfda2b5d966e48658b55d..eeca44fb6e94584b87ade05e9f334c554e68146b 100644 (file)
@@ -2031,6 +2031,7 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type,
 
        if ((result_type & MYSQL_BOTH) == 0) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "The result type should be either MYSQL_NUM, MYSQL_ASSOC or MYSQL_BOTH");
+               result_type = MYSQL_BOTH;
        }
        
        ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);