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.
I was blocked today because I didn't realise ereg doesn't use regex pattern delimiters. I think we should add a little bit of doxygen to explain that the 6.x version of file_scan_directory used ereg, rather than preg.
Comment | File | Size | Author |
---|---|---|---|
#7 | ereg-pcre-1199516-3.patch | 899 bytes | psynaptic |
#6 | ereg-pcre-1199516-2.patch | 930 bytes | psynaptic |
#1 | ereg-pcre-1199516-1.patch | 930 bytes | psynaptic |
Comments
Comment #1
psynaptic CreditAttribution: psynaptic commentedHere's the patch.
Comment #2
manarth CreditAttribution: manarth commentedUseful patch - ereg is very different to preg_match, and in my experience devs expect PCRE rather than posix regex, so ereg is unexpected, and the docs should reflect this.
Comment #3
Gábor HojtsySounds a bit too informal to me. I understand it is to the point, but it clearly assumes a certain view with the "Posix not PCRE" explanation. Would be great to make it a more general explanation on what is this.
Comment #4
grendzy CreditAttribution: grendzy commentedereg really needs to be removed, anyway:
#883038: PHP warning: Function ereg() is deprecated in includes/file.inc
Comment #5
Gábor Hojtsy@grendzy: How would you imagine that while keeping backwards compatibility? Unless we have a plan for that, let's fix the docs instead (reopening for that).
Comment #6
psynaptic CreditAttribution: psynaptic commentedLet's try again...
Comment #7
psynaptic CreditAttribution: psynaptic commentedWrong file in last post. Here's the correct one.