Download & Extend

Clone Profile incompatible with PCRE <7.0

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

Status:active» postponed (maintainer needs more info)

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":

<?php
phpinfo
();
?>

#2

For us, it's PCRE Library Version 6.6 06-Feb-2006

#3

Title:Error on Clone Profile?» Clone Profile incompatible with PCRE <7.0

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

Status:postponed (maintainer needs more info)» fixed

Fixed in CVS

#5

Thanks!

#6

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here