The error you’re encountering, “PHP Fatal error: Uncaught Error: [] operator not supported for strings”, indicates that in the file base-admin.class.php of the Revolution Slider (or RevSlider) plugin, you are trying to use the [] operator to add a value to a variable that has been declared as a string. The [] operator is used to add elements to an array, not to manipulate strings.

Steps to Resolve the Error:

  1. Locate the problematic file and line:
    • The error specifies the exact location of the file and line where the problem occurs: /www/httpdocs/wp-content/plugins/revslider/includes/framework/base-admin.class.php.
  2. Edit the file:
    • Open the file in a text editor or the code editor of your choice.
  3. Find the problematic line:
    • Go to the line of code that is causing the error. Look for the line that uses the [] operator on a variable that might have been initialized as a string.
  4. Ensure the variable is an array:
    • Before using the [] operator, check if the variable is an array. If it’s not, convert it to an array. You can do this as follows:

    php

    if (!is_array($variable)) {
    $variable = [];
    }
    $variable[] = $value; // This is where a value is added to the array
    • If the variable is initialized as a string, convert it to an array:

    php

    if (is_string($variable)) {
    $variable = [];
    }
    $variable[] = $value;
  5. Save the changes and test:
    • After making these changes, save the file and reload the page or functionality that was generating the error.
  6. Update or replace the plugin:
    • If this solution is complex or the problem persists, consider updating the plugin to the latest version. Sometimes, the plugin developers have already fixed these issues in newer versions.

If you’re not comfortable editing the code, I recommend making a backup of the original file before making any changes. You might also consider contacting the plugin’s support team for specific assistance.