WPIntell

Source evidence

Undefined array key “ssba_bar_buttons”

Simple Share Buttons Adder · support · 2025-03-06T13:15:00+00:00

complaintsentiment
mediumseverity
0.92relevance
3replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

6 / 22 rows with source links

27.3% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

16 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
khanhvo unresolved
My error logs show below errors that have filled up the log size. Can you please advise? (WordPress 6.7.2 on PHP 8.2 with Simple Share Buttons Adder plugin version 8.5.2.) 2025/03/07 00:03:15 [error] 471659#471659: *135253 FastCGI sent in stderr: "PHP message: PHP Warning: Undefined array key "ssba_bar_buttons" in /.../wp-content/plugins/simple-share-buttons-adder/php/class-buttons.php on line 602; Current code on line 602: $network_color = 'Y' === $arr_settings['ssba_new_buttons'] || 'Y' === $arr_settings['ssba_bar_buttons'] ? self::get_button_color( $button_name ) : ''; 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

Comments

3 shown
khanhvo 2025-03-12T03:57:00+00:00

Hi, I’m following up on this. Any news?

ShareThis 2025-04-10T18:37:00+00:00

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.

khanhvo 2025-04-11T04:05:00+00:00

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