Home Forums ePix Support Mobile Detect causing fatal error in ePix

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #48742

    heli
    Participant

    Hi Tom, Andy,

    Since updating the ePix theme last night I’ve been getting this message.

    Fatal error: Cannot redeclare class Mobile_Detect in /home/wideeyedev/clients.wide-eyedesign.com/WideEyedDesign/wp-content/themes/WideEyedDesign/lib/adm/functions/Mobile_Detect.php on line 27

    I did have a look at the Mobile_Detect.php page in Dreamweaver and also did a bit of hunting on the WordPress help forum but there was nothing there that made any sense to me – the code fix I tried just put the syntax completely wrong and I don’t know enough PHP to make it right!

    Help?

    best wishes

    Heli

    PS. I can log into the admin area of my site with no problems – let me know if you need to take a look and I’ll set up an username etc

    #48786

    Tom ( Support)
    Keymaster

    Hi Heli,

    It looks like a plugin and theme are declaring the same class, you can resolve it by editing ePix/lib/inc/page-constants.php and change this line.

    require_once NV_FILES . '/adm/functions/Mobile_Detect.php';

    to:

    if( !class_exists( 'Mobile_Detect' ) )
    {
    require_once NV_FILES . '/adm/functions/Mobile_Detect.php';
    }

    Kind regards,
    Tom

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

© 2018 Acoda