Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Create a directory name "0". Try to have file_scan_directory read files from that dir. It won't because "0" evalutates to false.
See example #1:
http://us2.php.net/readdir
Comment | File | Size | Author |
---|---|---|---|
#8 | file_230932.patch | 986 bytes | drewish |
#5 | file_scan_directory_5.patch | 602 bytes | cridenour |
file_scan_directory.patch | 565 bytes | ryanlath | |
Comments
Comment #1
drewish CreditAttribution: drewish commentedneed to fix this in HEAD and then backport. made false upper case but this looks good to go.
setup some test files:
then, without the patch tried running:
print_r(file_scan_directory('sites/default/test', '.*'));
after the patch it returned:
Comment #2
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD and DRUPAL-6. Let's start writing tests for these things ... thanks.
Comment #3
drewish CreditAttribution: drewish commentedDries, of course. if simpletest has been in core when i tested it i would have.
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #5
cridenour CreditAttribution: cridenour commentedBack ported for D5.
Comment #6
drummCapitalized false and committed to 5.x.
FALSE needs to be capitalized in HEAD and 6.x. Drewish mentioned this in his review.
Comment #7
drewish CreditAttribution: drewish commentedah, it looks like i thought i was was attaching a patch at the time.
Comment #8
drewish CreditAttribution: drewish commentedhere it is for HEAD.
Comment #9
webchickThanks. :)
Comment #10
webchickOops. 6.x too.
Comment #11
Gábor HojtsyLanded in 6.x as well. Thanks!
Comment #12
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.