When you activate the Slider Revolution plugin from ThemePunch in WordPress, the activation fails because of a fatal error like this:

Fatal error: Uncaught Error: [] operator not supported for strings in /****/wp-content/plugins/revslider/includes/framework/base-admin.class.php:71 Stack trace: #0 /****/wp-content/plugins/revslider/admin/revslider-admin.class.php(572): RevSliderBaseAdmin::addMetaBox('Revolution Slid...', '', Array, NULL) #1 /****/wp-content/plugins/revslider/admin/revslider-admin.class.php(73): RevSliderAdmin->addSliderMetaBox() #2 /****/wp-content/plugins/revslider/admin/revslider-admin.class.php(44): RevSliderAdmin->init() #3 /****/wp-content/plugins/revslider/revslider.php(162): RevSliderAdmin->__construct('/Applications/M...') #4 /****/wp-admin/includes/plugin.php(1882): include('/Applications/M...') #5 /****/wp-admin/plugins.php(164): plugin_sandbox_scrape('revslider/revsl...') #6 {main} thrown in /****/wp-content/plugins/revslider/includes/framework/base-admin.class.php on line 71

There is no news of an official update for the plugin from ThemePunch – I Googled and searched their website but found no information – and so I can offer you the following temporary fix!

The problem

It looks like a quality control mistake on the behalf of ThemePunch: the variable $arrMetaBoxes is being initialised as an empty string, however, clearly it needs to be an array instead…even the name suggests that! 😀

The solution

Change line #21 in base-admin.class.php from:

private static $arrMetaBoxes = '';

to:

private static $arrMetaBoxes = array();

Questions or comments?

I've made it very easy for you to send me a question or a comment regarding what you have just read - all you need to do is login with Facebook below, post your question, and I'll reply directly.

Pin It on Pinterest