In D6 the $mask paramater to file_scan_directory() should not contain the wrapping "/" characters because D6 uses ereg instead of preg_match like D7. I'm testing in Pressflow 6 which definitely has issues, from looking at the code I reckon stock Drupal 6 also has this problem.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

James Andres’s picture

The patch..

rjbrown99’s picture

Status: Active » Needs review

There's a patch, changing status.

PatchRanger’s picture

Patch works, thanks.
To reproduce it easily just paste this code into PHP execution devel-block:

dpm(file_scan_directory('includes', '/\.inc$/'));

returns an empty array, while

dpm(file_scan_directory('includes', '\.inc$'));

returns an array of inclusions as it should.