the error log is :

preg_replace() [function.preg-replace]: Unknown modifier '\' in /nodewords/nodewords.module on line 1035.

What is wrong with this?

Comments

avpaderno’s picture

Category: bug » support

I don't get any error like that.
PHP: Backslash reports the sequences \r, and \n are correctly interpreted by the regular expession; similar regular expression is also used in drupal_match_path().

It's rather probable the file nodewords.module was incorrectly copied on the server, or there is a problem with the server where Nodewords has been installed.

function drupal_match_path($path, $patterns) {
  static $regexps;

  if (!isset($regexps[$patterns])) {
    $regexps[$patterns] = '/^('. preg_replace(array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1'. preg_quote(variable_get('site_frontpage', 'node'), '/') .'\2'), preg_quote($patterns, '/')) .')$/';
  }
  return preg_match($regexps[$patterns], $path);
}
duckzland’s picture

Seems that the problem only occurs when I haven't configure the module yet, after configuring the module the problem dissapears

avpaderno’s picture

Category: support » bug
Status: Active » Fixed

I changed the string delimiter for two strings, and slightly changed another code line to be sure the code would not use an empty regular expression. The code as it was before didn't caused any error on PHP 5.3, but I changed the code to be sure other PHP versions would not cause any error too.

I changed the code, and committed in CVS for the development snapshot. Thanks for your report.

Status: Fixed » Closed (fixed)

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