admin
Karma: 101
|
Re:Problem with version PHP 5.3.2 - 2010/04/29 14:49
The uses of ereg* are all in the definitionbot. At line 151 you will find
| Code: | $desc= ereg_replace("<br />|<p>", " ", $desc);
|
and this could be replaced with
| Code: | $desc = str_replace(array('<br />', '<br />', '</p><p>', '</p>'), ' ', $desc);
|
Line 291 has
| Code: | if (eregi('{definition}',$newContent)) $page->text = showDefinition ($definitiony, $param, $newContent);
|
which could be replaced with
| Code: | if (false !== strpos($newContent, '{definition}')) $page->text = showDefinition ($definitiony, $param, $newContent);
|
That eliminates use of ereg* and also makes the code more efficient, since regular expression processing was never really needed in these now rather ancient fragments of code!
Post edited by: admin, at: 2010/04/29 14:50
Martin Brampton aka Counterpoint http://aliro.org http://black-sheep-research.com |