Posted by ealtman on February 16, 2010 at 9:22pm
3 followers
Jump to:
| Project: | FCKeditor - WYSIWYG HTML editor |
| Version: | 6.x-2.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
I haven't seen this error from anyone else, but Drupal logged the following when I tried to clone an FCKEditor role:
preg_match_all() [function.preg-match-all]: Compilation failed: unrecognized character after (?< at offset 4 in /.../sites/all/modules/fckeditor/fckeditor.admin.inc on line 253.
We're running PHP 5.1.6. I've never used preg_match_all, but I did a little searching and it looked like a parameter name (?) was missing from the $pat definition, so I thought I'd pass it along.
I rewrote$pat = "/^(?<name>.*?)_(?<n>[0-9]*)$/"
to$pat = "/^(?P<name>.*?)_(?P<n>[0-9]*)$/"
and that seemed to fix the problem
Comments
#1
According to the PHP manual, you're right. I just need to know why it works for me without the change. Could you check what version of the PCRE library is compiled in your PHP version? Just create a PHP Info page by putting the following code in a page and visiting it, and look for "PCRE Library Version":
<?phpphpinfo();
?>
#2
For us, it's PCRE Library Version 6.6 06-Feb-2006
#3
According to the PCRE changelog (http://www.pcre.org/changelog.txt), the syntax we use is only compatible with PCRE 7.0 and up. Before that version, only the syntax you suggest is valid. I'll update the code.
#4
Fixed in CVS
#5
Thanks!
#6
Automatically closed -- issue fixed for 2 weeks with no activity.