From: Dmitry Stogov Date: Wed, 3 Mar 2021 23:10:53 +0000 (+0300) Subject: Switch to new ZPP X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dd3bfb3704edb71ce83500720691f552e24cb425;p=php Switch to new ZPP --- diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index e459cce8cf..fe5043e375 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -1458,9 +1458,11 @@ PHP_METHOD(RecursiveDirectoryIterator, hasChildren) bool allow_links = 0; spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); - if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &allow_links) == FAILURE) { - RETURN_THROWS(); - } + ZEND_PARSE_PARAMETERS_START(0, 1) + Z_PARAM_OPTIONAL + Z_PARAM_BOOL(allow_links) + ZEND_PARSE_PARAMETERS_END(); + if (spl_filesystem_is_invalid_or_dot(intern->u.dir.entry.d_name)) { RETURN_FALSE; } else {