summaryrefslogtreecommitdiff
path: root/ext/mysql/php_mysql.c
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2007-11-08 13:29:06 +0000
committerAntony Dovgal <tony2001@php.net>2007-11-08 13:29:06 +0000
commit4a6b52dc018dbd9def962058f7ae50240e0fa1a8 (patch)
treefae04a1fa630636c2422843b5a85b8f5eb3a331f /ext/mysql/php_mysql.c
parent379e8a59703ac47f0361d0ea4e60d0af20ec0960 (diff)
downloadphp-git-4a6b52dc018dbd9def962058f7ae50240e0fa1a8.tar.gz
MFH: plug leak on invalid result type
Diffstat (limited to 'ext/mysql/php_mysql.c')
-rw-r--r--ext/mysql/php_mysql.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c
index 01d843b5e9..eeca44fb6e 100644
--- a/ext/mysql/php_mysql.c
+++ b/ext/mysql/php_mysql.c
@@ -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);