• Resolved webboty

    (@webboty)


    Hi, with PHP 7.0 all things work fine.
    Not so with PHP 7.3 it totally breaks the plugin backend.

    In the logs I find the message:

    PHP Fatal error: Uncaught Error: [] operator not supported for strings in …/wp-content/plugins/servebolt-optimizer/admin/admin-interface.php:193

    Please change:
    $links[] = sprintf('<a href="%s">%s</a>', admin_url( 'options-general.php?page=servebolt-wp' ), sb__('Settings'));

    to:
    array_push($links, sprintf('<a href="%s">%s</a>', admin_url( 'options-general.php?page=servebolt-wp' ), sb__('Settings')));

    That should fix the issue.
    Thanks

Viewing 1 replies (of 1 total)
  • Thread Starter webboty

    (@webboty)

    Update … the issue was not primarly caused by this plugin but another one (wp-editor) that transformed the links array to a string, which caused this plugin to fail. The code above just made sure there was no string operation and fixed the individual error at the first level. However it did not solve the culprit at its root.

    So this is not a PHP 7.3 issue of this plugin but of the other one – nevertheless … the push_array function is cleaner to use to avoid issues with other plugins. I would still recommend the change of the code.

Viewing 1 replies (of 1 total)
  • The topic ‘PHP 7.3 Incompatible’ is closed to new replies.