garethtdavies / detect-mobile

Lightweight PHP plugin for EE2/EE5 that detects a mobile browser using the PHP Detect Mobile class

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't seem to use script in-page...

liamcrean opened this issue · comments

I get this error on most templates:

Fatal error: Cannot redeclare class Mobile_detect in /var/www/vhosts/sagmeisterwalsh.com/httpdocs/admin/expressionengine/third_party/detect_mobile/libraries/Mobile_detect.php on line 35

On pages with no other plugins or EE tags it seems to work...

Any idea what might cause this?

Hi. You must be using another addon that also has the class name Mobile_detect. I guess the mobile detect plugin? I actually only used this class name as it is the original from http://mobiledetect.net/. I'll simply rename this class and push an update.

Fixed with c417cbe

That's Grand. Thanks Gareth - great support, excellent plugin!