-
- 6 Posts
Hey there,
Been getting an error after updating to Evolution 1.0.3.
The error I am getting is:
PHP error debug
Error: Function eregi() is deprecated
Error type/ Nr.: - 8192
File: D:\WEBS\CS\new\manager\includes\document.parser.class.inc.php(770) : eval()’d code
Line: 9
I have looked at the page and cannot find the eregi command but there is a eval on line 770, As far as i can make out eval is not the code command in question it is the eregi command that needs updated to preg_match.
Where can I find the error in question to fix?
Thanks
Code on line 9 of one of your Snippets is causing this. Line 770 in the document.parser.class.inc.php is the code responsible for executing Snippets.
-
- 177 Posts
even though most of the thread is old, once again thanks to the community for this post because just came across this problem moving hosts, in my case it was a site using RandomAd that causes the error (thanks to aceman3000 for the query code to isolate that - it might have taken ages without that!)
change the line in the snippet
$is_image = eregi( "jpg|jpeg|JPEG|JPG|gif|GIF|png|PNG",$file_type );
to
$is_image = preg_match( "/jpg|jpeg|JPEG|JPG|gif|GIF|png|PNG/i",$file_type );
-
- 1 Posts
Error with php 5.3 with Fix
function bbcode($text) {
$text=eregi_replace("\\[img\\](http://[^\\[]+)\\[/img\\]","<img src=\"\\1\" border=\"0\">",$text);
$text=eregi_replace("\\[b\\]([^\\[]*)\\[/b\\]","<b>\\1</b>",$text);
$text=eregi_replace("\\[i\\]([^\\[]*)\\[/i\\]","<i>\\1</i>",$text);
$text=eregi_replace("\\[u\\]([^\\[]*)\\[/u\\]","<u>\\1</u>",$text);
$text=eregi_replace("\\[email\\]([^\\[]*)\\[/email\\]","<a href=\"mailto:\\1\">\\1</a>",$text);
$text=eregi_replace("\\[url\\]www.([^\\[]*)\\[/url\\]","<a href=\"http://www.\\1\" target=\"_blank\">www.\\1</a>",$text);
$text=eregi_replace("\\[url\\]([^\\[]*)\\[/url\\]","<a href=\"\\1\" target=\"_blank\">\\1</a>",$text);
$text=eregi_replace("\\[url=www.([^\\[]+)\\]([^\\[]*)\\[/url\\]","<a href=\"http://www.\\1\" target=\"_blank\">\\2</a>",$text);
$text=eregi_replace("\\[url=http://([^\\[]+)\\]([^\\[]*)\\[/url\\]","<a href=\"http://\\1\" target=\"_blank\">\\2</a>",$text);
$text=eregi_replace("\\[i\\]([^\\[]*)\\[/i\\]","<i>\\1</i>",$text);
$text=eregi_replace("\\[u\\]([^\\[]*)\\[/u\\]","<u>\\1</u>",$text);
$text=eregi_replace("\\[b\\]([^\\[]*)\\[/b\\]","<b>\\1</b>",$text);
return $text;
}