• Resolved itoben

    (@itoben)


    Hi,

    I have this error reporting:

    PHP Warning: Cannot assign an empty string to a string offset.

    Call Stack :

    wp_localize_script()
       wp-content/plugins/toolbar-publish-button/toolbar-publish-button.php:307

    In file toolbar-publish-button.php, I suggest to add this line (function enqueue_admin_assets() after line 300):

    $button_bg_color = !empty($button_bg_color) ? $button_bg_color : '#fff';

    And error it’s fixed.

    Thanks for this plugin.

    • This topic was modified 7 years, 10 months ago by itoben.
    • This topic was modified 7 years, 10 months ago by itoben.
    • This topic was modified 7 years, 10 months ago by itoben. Reason: Updated message
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author webbistro

    (@webbistro)

    Hi @itoben,

    Thank you! We will include this to the next update.

    Best,
    -Nadia

    Thread Starter itoben

    (@itoben)

    Great,

    I just test this, it’s better to add:

    $button_bg_color = !empty($button_bg_color) ? $button_bg_color : '#23282d';

    Because it’s the WordPress background default color. ??

    • This reply was modified 7 years, 10 months ago by itoben. Reason: Add Resolved Topic
    Plugin Author webbistro

    (@webbistro)

    Hi @itoben,

    It’s fixed, thank you for drawing my attention to the issue!

    Best,
    -Nadia

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fixed PHP Warning’ is closed to new replies.