From 5f6b2c12a258116950e47c8a0411969b52eab682 Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Sat, 17 Feb 2018 23:11:00 -0300 Subject: [PATCH] Remove explicit params count check Relying on ZPP instead. Also, use ZEND_NUM_ARGS() instead of hardcode number of parameters --- ext/mysqli/mysqli_warning.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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); -- 2.40.0