2012-03-05, 07:55:24
Hi, I had some problems today with the RePlacer plugin. Basically it just replaced the text with empty strings. It's probably my PHP environment, but it worked after I changed 4 lines of code. The diff between the original code and my version is below. I think it's also cleaner. Any change the original coder could look at this "patch" and release a newer version?
Code:
$ diff replacer.php replacer.php.original
168c168
< $found_replace[] = (string) $data[$match[1]]->code;
---
> $found_replace[] = $data[$match[1]]->code;
175,178c175,178
< # ob_start();
< # eval($found_replace[$counter]);
< # $found_replace[$counter] = ob_get_contents();
< # ob_end_clean();
---
> ob_start();
> eval($found_replace[$counter]);
> $found_replace[$counter] = ob_get_contents();
> ob_end_clean();