Skip to content

Commit 370cb04

Browse files
committed
Use RETURN_EMPTY_ARRAY() on empty glob returns
1 parent 94678d9 commit 370cb04

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)