• I plaved the code in my theme within the loop and got the button displayed. But I also got this error message:

    Notice: Undefined variable: output_later in /customers/myplace.com/myplace.com/httpd.www/wp-content/plugins/add-to-any/add-to-any.php on line 103
    
    Notice: Undefined variable: output_later in /customers/myplace.com/myplace.com/httpd.www/wp-content/plugins/add-to-any/add-to-any.php on line 191

    How to get rid of these errors?

    http://wordpress.org/extend/plugins/add-to-any-subscribe/

Viewing 1 replies (of 1 total)
  • Hi. I realize this is an old post – hopefully you’ve fixed or blown this off by now – but the easy fix for me was to check that the variable is set before referencing it. This involved editing the PHP code for the plug-in, so if you’re uncomfortable with that, stop reading now. But it’s actually a pretty easy fix:

    ORIGINAL CODE:
    if( $button_fname == 'favicon.png' || $button_fname == 'share_16_16.png' ) {

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

    The idea is

    if ( (variable is set) AND ( condition1 OR condition2 ) ) {
    …do something
    }

    The error is occurring bc. PHP is trying to check the value of a variable that does not exist.

    Of course the easiest fix is to turn off debug mode in WordPress 😉

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Add to Any: Subscribe Button] I get an error!’ is closed to new replies.