From: Gabriel Caruso Date: Sun, 18 Feb 2018 02:11:00 +0000 (-0300) Subject: Remove explicit params count check X-Git-Tag: php-7.3.0alpha1~343^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5f6b2c12a258116950e47c8a0411969b52eab682;p=php Remove explicit params count check Relying on ZPP instead. Also, use ZEND_NUM_ARGS() instead of hardcode number of parameters --- diff --git a/ext/mysqli/mysqli_warning.c b/ext/mysqli/mysqli_warning.c index e0d9d7abdf..0ff46ec7f9 100644 --- a/ext/mysqli/mysqli_warning.c +++ b/ext/mysqli/mysqli_warning.c @@ -256,10 +256,7 @@ PHP_METHOD(mysqli_warning, __construct) MYSQLI_WARNING *w; MYSQLI_RESOURCE *mysqli_resource; - if (ZEND_NUM_ARGS() != 1) { - WRONG_PARAM_COUNT; - } - if (zend_parse_parameters(1, "o", &z)==FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "o", &z) == FAILURE) { return; } obj = Z_MYSQLI_P(z);