WordPress.org

Ready to get started?Download WordPress

Forums

Posts By Tag
[resolved] Debug: PHP Notice Undefined variable (4 posts)

  1. RiccardoP
    Member
    Posted 1 year ago #

    I have this PHP Notice when active wp_debug.

    Notice: Undefined variable: onclick_attr in wp-content/plugins/posts-by-tag/posts-by-tag.php on line 942
    
    Notice: Use of undefined constant disable_cache - assumed 'disable_cache' in wp-content/plugins/posts-by-tag/posts-by-tag.php on line 473

    I'm not a programmer but i've solved the first error with this:

    if ( $onclick != '' ) {
     $onclick_attr = ' onclick = "' . $onclick . '" ';
     }

    on line 911 and second error with a $ before disable_cache on line 474:

    if (!$disable_cache) { // store in cache

    I hope you can fix it on next release!

    http://wordpress.org/extend/plugins/posts-by-tag/

  2. Sudar
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for letting me know about this. I will release a minor release with a fix for this.

  3. RiccardoP
    Member
    Posted 1 year ago #

    Ok, thank you.

  4. Sudar
    Member
    Plugin Author

    Posted 1 year ago #

    I just released v3.0.1 of the Plugin with the fix.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic