com php-src: Fix #78790: mysqli_get_client_info() e xpects exactly 0 parameters: ext/mysqli/mysqli_ap i.c

From: Date: Mon, 11 Nov 2019 09:01:17 +0000
Subject: com php-src: Fix #78790: mysqli_get_client_info() e xpects exactly 0 parameters: ext/mysqli/mysqli_ap i.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-109231@lists.php.net to get a copy of this message
Commit: 87fad8cdf0b978bb7dca5123cb77efd1449c0132 Author: Christoph M. Becker <cmbecker69@gmx.de> Mon, 11 Nov 2019 09:58:10 +0100 Parents: 3b34c4fa122583f6b160b743edb8d5dc03e57bf7 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=87fad8cdf0b978bb7dca5123cb77efd1449c0132 Log: Fix #78790: mysqli_get_client_info() expects exactly 0 parameters mysqli_get_client_info() and mysqli_thread_safe() can also be called as methods, so we have to cater to this when parsing the arguments. Bugs: https://bugs.php.net/78790 Changed paths: M ext/mysqli/mysqli_api.c Diff: diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index aac3134a598...e51c0cc7418 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -1374,7 +1374,9 @@ PHP_FUNCTION(mysqli_free_result) Get MySQL client info */ PHP_FUNCTION(mysqli_get_client_info) { - if (zend_parse_parameters_none() == FAILURE) { + zval *mysql_link; + + if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) { return; } @@ -2631,7 +2633,9 @@ PHP_FUNCTION(mysqli_thread_id) Return whether thread safety is given or not */ PHP_FUNCTION(mysqli_thread_safe) { - if (zend_parse_parameters_none() == FAILURE) { + zval *mysql_link; + + if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) { return; }

« previous php.cvs (#109231) next »