0

wp-cli & a mu plugin don't get along causing the following error:

"Fatal error: Call to a member function getAdminOptions() on null in /wp-content/mu-plugins/mobile-smart-proMU.php"

Line of code causing the problem is:

$options = $mobile_smart->getAdminOptions();

I have reached out to plugin developer and for the time being, I have changed the mu-plugins folder to mu-plugins-old. I am Wondering if there is a way to set a exclude rule in config.yml for mu plugins?

0

I'm the author of Mobile Smart Pro. I'm in the midst of testing WP-CLI with Mobile Smart Pro, and on line 27 of /wp-content/mu-plugins/ you should add the following test:

if (!$mobile_smart) return $pluginList;

So the section would look like:

`function disablePlugins($pluginList) {

    if (is_admin()) return $pluginList; // only deactivate on front end

    global $mobile_smart;

    if (!$mobile_smart) return $pluginList;

    // get options
    $options = $mobile_smart->getAdminOptions();

I'll be releasing an update for this today, but wanted to respond on here for you too.

Dan

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.