Skip to content

Commit d24eab5

Browse files
authored
Use RETURN_EMPTY_ARRAY() on empty glob returns (#19642)
1 parent 243aedd commit d24eab5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ext/standard/dir.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,7 @@ PHP_FUNCTION(glob)
476476
#ifdef PHP_GLOB_NOMATCH
477477
no_results:
478478
#endif
479-
array_init(return_value);
480-
return;
479+
RETURN_EMPTY_ARRAY();
481480
}
482481

483482
array_init(return_value);

0 commit comments

Comments
 (0)