[pmwiki-devel] Strange bug...

The Editor editor at fast.st
Mon Mar 26 11:47:40 CDT 2007


Someone pointed out a strange bug I was able to fix by changing

$r = str_replace("{$x}", '~*~', $r);

to

$r = str_replace('{'.$x.'}', '~*~', $r);

Evidently the string replacement matched on patterns like {emailbody}
when $x=email.  It seems it shouldn't match.  Can anyone explain why?

Cheers,
Dan



More information about the pmwiki-devel mailing list