If I enable, "smart tagging" the content in most of my nodes disappears and I get the following error:

	preg_replace(): Unknown modifier 'I' in /home/donorge/public_html/giveorange/modules/delicious/delicious.module on line 846.

appears to be this line that is causing problems:

$text = preg_replace('/(?<=>)([^<]+)?(\b'.$tag.'\b)/i','$1$2'.$deliciousLink,$text);

Comments

merlinofchaos’s picture

Assigned: Unassigned » merlinofchaos

What version of PHP are you running?

jasonwhat’s picture

4.4.1

jasonwhat’s picture

Any update on this? I'd really like to give this module a try.

merlinofchaos’s picture

Does it work if you replace the .$tag. portion with .preg_quote($tag). ?

jasonwhat’s picture

I changed two instances of that and no change. However, I'm not sure if I replaced the code properly. Could you be more specific about where the changes would need to be made?

merlinofchaos’s picture

Specifically I mean:

$text = preg_replace('/(?<=>)([^<]+)?(\b' . preg_quote($tag) . '\b)/i','$1$2'.$deliciousLink,$text);
jasonwhat’s picture

When I do that I get this error:

Warning: preg_replace(): Unknown modifier 'I' in /home/mysite/public_html/modules/delicious/delicious.module on line 846

benthere’s picture

I got a similar error. Only difference was the unknown modifier was "1". I'm building a site related to 9/11, so my first assumption was that content is not escaped or filtered properly in either the title or category fields, so "9/11" looks like a "/1" modifier. I haven't looked at the code, just an idea.

merlinofchaos’s picture

That seems reasonable, though the preq_quote fix from above should take care of that. I'm not entirely sure why it doesn't.

I admit this one's sat around for awhile because I played with it and could not figure out what was wrong. :/

Anonymous’s picture

Assigned: merlinofchaos »
Status: Active » Closed (fixed)

No longer supporting 4.X