JavaScript code

How to fix fatal RevSlider error in dashboard after upgrading to PHP 7

Photo by Sarah Pflug from Burst

I have an old website running visual composer coupled with Revolution Slider plugin. Recently, my host upgraded the PHP version from PHP 5.3 to PHP 7.

Hell broke loose after the upgrade. I noticed a fatal error lingering on top of my dashboard.

PHP Fatal error:  Uncaught Error: [] operator not supported for strings in /var/www/html/wp-content/plugins/revslider/includes/framework/base-admin.class.php:141

Sometimes this error may prevent you from logging into your back-end. If this happens you to you, all you need to do is to disable the plugin for the login page to appear. We will cover this in the next section of the article.

To solve the issue, we shall follow the steps below.

Disable Rev-slider plugin

First, we need to regain the website back-end. We achieve this by logging in to our CPANEL or via SSH if your server is Linux based. We then navigate the file system to the WordPress plugins folder.


Rename the RevSlider folder for it to be disabled. Once renamed, go back and access the WP-Admin back-end and you will now be able to access your login page. Enter your login credentials to view the back-end.

Once logged in, go back to file system and rename back your RevSlider folder. Refresh your plugin page. The RevSlider plugin should be visible under the in-active plugins tab.

Editing RevSlider files

You now need to edit the file located inside the framework folder in your plugin folder. The file is base-admin.class.php


There two ways of editing WordPress plugin files. The first method is through the WordPress plugin file editor. The second option is through the file manager if using CPANEL or via command line, that is if you are using SSH on Linux. Once the file is open, use control+find to locate and replace the line of code below.

Replace this:

private static $arrMetaBoxes = '';         //option boxes that will be added to post

With this:

private static $arrMetaBoxes = array();    //option boxes that will be added to post

Save and activate the RevSlider plugin. The fatal error should disappear. You will now be able to successfully login to your website back-end. Refresh the page you have assigned your slider to display. Your slider should now work!

Related Posts

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: