• Resolved ThemeMee

    (@thememee)


    Thanks for this plugin! To me, one outstanding issue…

    In testing locally, I always have debug on just to see if anything’s misbehaving. 😉 When I add a custom graphic for the button and manually add the code to my template, I get these errors:

    Notice: Undefined variable: button_fname in devsite\wp-content\plugins\add-to-any\add-to-any.php on line 246
    
    Notice: Undefined variable: button_fname in devsite\wp-content\plugins\add-to-any\add-to-any.php on line 246
    
    Notice: Undefined variable: button_text in devsite\wp-content\plugins\add-to-any\add-to-any.php on line 253

    Searching for a solution, I found that this suggestion fixes the problem, though it would be nice to see the plugin updated so as not to break the fix!

    In add-to-any.php, these are my modified lines that eliminate the error generation:

    246
    if ( (isset($button_fname)) && ($button_fname == 'favicon.png' || $button_fname == 'share_16_16.png' ) ) {

    253
    if( (isset($button_text)) && (!$button_fname || $button_fname == 'favicon.png' || $button_fname == 'share_16_16.png') ) {

    Thanks again for your work on this plugin.

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom Graphic/Button Generates 'Undefined Variable' Errors in Debug Mode’ is closed to new replies.