Support » Plugin: CM Tooltip Glossary » Unknown Modifier?

  • Resolved Postmatic

    (@vernal)


    Howdy,

    We have been using this plugin just fine, however with our recent upgrade to 1.4 our site is throwing this error:
    Warning: preg_replace() [function.preg-replace]: Unknown modifier ‘P’ in /nas/wp/www/staging/keshet/wp-content/plugins/enhanced-tooltipglossary/glossary.php on line 343

    Warning: preg_replace() [function.preg-replace]: Unknown modifier ‘P’ in /nas/wp/www/staging/keshet/wp-content/plugins/enhanced-tooltipglossary/glossary.php on line 398

    Is anyone else having this problem? I can’t figure out if it is a conflict with another plugin, or something else. Any starting place would be great.

    Thanks,
    Jason

    http://wordpress.org/extend/plugins/enhanced-tooltipglossary/

Viewing 3 replies - 1 through 3 (of 3 total)
  • This occurs because the slash used to delimit the regular expressions isn’t being escaped, so any glossary term with a slash in it barfs hard. In your case the slash comes in front the the letter ‘P’.

    Two changes are needed to fix.

    glossary.php:336 should be

    $glossary_title = preg_quote($glossary_title, '/');

    and glossary.php:349 should be

    $link_search = '/<a' . $timestamp . '>(' . preg_quote($glossary_item->post_title, '/') . '[A-Za-z]*?)<\/a' . $timestamp . '>/i';

    Thanks, Dylan. This works. I hope it gets rolled into future updates…

    Plugin Author CreativeMinds

    (@creativemindssolutions)

    In version 1.5 we added slash to be escaped. Tnx

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Unknown Modifier?’ is closed to new replies.