hi

I am running drupal 6.14 in debian etch fully upgraded with

php5 5.2.0+dfsg-8+etch16
apache2 2.2.3-4+etch11

after upgrading biblio module 1.7 to 1.8 I am getting this error when I access to publications in my library module

warning: preg_match() [function.preg-match]: Unknown modifier '[' in /var/www/drupal6/sites/all/modules/biblio/biblio_style_ama.inc on line 271

this is the line 271. it seems this regex is not working:

 if (!preg_match("[?!.][ \"" . $markupPatternsArray["italic-suffix"] . "]*$", $output)) $output .= ".";

I am a total php newby so by now I have commented out that line and everything seems to be working. ¿any clue about how to solve this error?

many thanks in advance.

Comments

rjerome’s picture

There should be a forward slash in front of that first square ( [ ) bracket like this...

if (!preg_match("/[?!.][ \"" . $markupPatternsArray["italic-suffix"] . "]*$", $output)) $output .= ".";
rjerome’s picture

Status: Active » Fixed

fixed in 1.9 release

esplinter’s picture

Status: Fixed » Needs review

hi

I have just upgrade to 6.x-1.9 and started getting this error:

warning: preg_match() [function.preg-match]: No ending delimiter '/' found in /var/www/drupal6/sites/all/modules/biblio/biblio_style_ama.inc on line 271.

this is the original line in line 271 in file biblio_style_ama.inc where the error is:

 if (!preg_match("/[?!.][ \"" . $markupPatternsArray["italic-suffix"] . "]*$", $output)) $output .= ".";

I solved it just adding a final '/' . with this line it seems to be working ok:

if (!preg_match("/[?!.][ \"" . $markupPatternsArray["italic-suffix"] . "]*$/", $output)) $output .= ".";
rjerome’s picture

Status: Needs review » Fixed

Right you are, that will teach me to commit code without testing it :-(

Ron.

http://drupal.org/cvs?commit=302644

esplinter’s picture

thanks for a so quick fix!!

Status: Fixed » Closed (fixed)

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