• My php logs show this warning, every time a page loads:

    PHP Warning: Undefined array key "ssba_bar_buttons" in ../wp-content/plugins/simple-share-buttons-adder/php/class-buttons.php on line 602;

    Using WordPress 6.6.2 on PHP 8.2.24 with Simple Share Buttons Adder plugin version 8.5.1.

    • This topic was modified 1 month, 2 weeks ago by joerij. Reason: added plugin version
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor ShareThis

    (@sharethis)

    Hi @joerij,

    The warning you’re seeing is likely related to compatibility with PHP 8.2. While version 8.5.0 of the Simple Share Buttons Adder fixed many PHP 8.2 deprecation errors, this particular issue might still occur due to uninitialized array keys.

    Ensure your plugin is updated to the latest version, which you’ve already confirmed as 8.5.1. Try resetting the plugin settings by saving or resetting configurations in the settings menu to initialize all required keys. If you’re comfortable editing files, you can fix the issue temporarily by opening class-buttons.php, locating line 602, and replacing the code referencing ssba_bar_buttons with:

    $bar_buttons = $settings['ssba_bar_buttons'] ?? [];

    This change ensures the array key defaults to an empty array if not set.

    While the plugin is tested for PHP 8.2, some warnings might persist. If this affects functionality, consider downgrading to PHP 8.1 as a temporary workaround.

    Let us know if you need further assistance!

    — The ShareThis Support Team

    Thread Starter joerij

    (@joerij)

    Configuring the plugin again solved the issue. Thanks for the support.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.