mirror of
https://github.com/php/php-src.git
synced 2025-01-18 17:54:05 +08:00
MFH: plug leak on invalid result type
This commit is contained in:
parent
379e8a5970
commit
4a6b52dc01
@ -2031,6 +2031,7 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type,
|
|||||||
|
|
||||||
if ((result_type & MYSQL_BOTH) == 0) {
|
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");
|
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);
|
ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
|
||||||
|
Loading…
Reference in New Issue
Block a user