Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[SOLVED] How do i fix deprecated Function eregi()?
I am using the act_if_mobile plugin and I get an error due to a deprecated function. The suggestion on takien.com does not help. The line with the problem is:
if(eregi('up.browser|up.link|windows ce|iemobile|mini|mmp|symbian|midp|wap|phone|pocket|mobile|pda|psp',$_SERVER['HTTP_USER_AGENT'])){
return true;
}
can anyone suggest a fix for this?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: [SOLVED] How do i fix deprecated Function eregi()?
if(preg_match('/(up.browser|up.link|windows ce|iemobile|mini|mmp|symbian|midp|wap|phone|pocket|mobile|pda|psp)/i', $_SERVER['HTTP_USER_AGENT']))
{
return true;
}
Offline
Re: [SOLVED] How do i fix deprecated Function eregi()?
Thanks sooo much Ruud. That indeed fixes it.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline