Hi, I’m following up on this. Any news?
Hi Khanhvo,
Thanks for reaching out, and I totally understand how frustrating constant error log entries can be.
This warning is due to the Simple Share Buttons Adder plugin referencing an array key (ssba_bar_buttons) that doesn’t exist when it’s expecting it to. This can happen with PHP 8.2+, which is stricter about undefined array keys. Here’s how to resolve it:
You or your developer can modify the plugin code around line 602 to prevent the warning. Replace:
$network_color = 'Y' === $arr_settings['ssba_new_buttons'] || 'Y' === $arr_settings['ssba_bar_buttons'] ? self::get_button_color( $button_name ) : '';
With:
$network_color = (isset($arr_settings['ssba_new_buttons']) && $arr_settings['ssba_new_buttons'] === 'Y') ||
(isset($arr_settings['ssba_bar_buttons']) && $arr_settings['ssba_bar_buttons'] === 'Y')
? self::get_button_color( $button_name ) : '';
This will check if the keys are set before accessing them, which avoids the PHP warning.
If you’re not comfortable editing plugin files, I recommend contacting a WordPress developer or the plugin author directly for a more permanent fix.
Let me know if you’d more help.
ShareThis Team.
Hi ShareThis Team,
Thanks for the response, and for providing the specific code fix for the PHP warning in this Simple Share Buttons Adder plugin.
I will apply the suggested change manually for now to resolve the warnings temporarily.
Regarding your suggestion to contact the plugin author for a permanent fix: Just to clarify, is the ShareThis team the maintainer of the Simple Share Buttons Adder plugin?
If so, could you please confirm if this fix will be incorporated into the next official plugin update? Applying manual edits is only a temporary measure, as they risk being overwritten during standard updates.
Thanks again for your assistance.
Regards,
Khanh