diff options
author | Dmitry Stogov <dmitry@zend.com> | 2021-03-04 02:10:53 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2021-03-04 02:10:53 +0300 |
commit | dd3bfb3704edb71ce83500720691f552e24cb425 (patch) | |
tree | 66b713ca1111afa8cd6c002f4ed7965ee3eb0a87 | |
parent | d02734f05e95762cff30e2737e16cc289c155c8c (diff) | |
download | php-git-dd3bfb3704edb71ce83500720691f552e24cb425.tar.gz |
Switch to new ZPP
-rw-r--r-- | ext/spl/spl_directory.c | 8 |
1 files changed, 5 insertions, 3 deletions
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 { |