Skip to content

Commit

Permalink
Switch to new ZPP
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Mar 3, 2021
1 parent d02734f commit dd3bfb3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ext/spl/spl_directory.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit dd3bfb3

Please sign in to comment.