WordPress.org

Forums

Subscribe To Comments Reloaded
Error in add_subscription() (5 posts)

  1. kitchin
    Member
    Posted 2 years ago #

    In version 2.0.2, the function add_subscription() will not work with a non-zero $_post_id. At lines 605 and 606 $post_id is not defined. It should be $_post_id.
    Found using WP_DEBUG, when creating a new page in Dashboard.

    http://wordpress.org/extend/plugins/subscribe-to-comments-reloaded/

  2. creativecoder
    Member
    Posted 2 years ago #

    Thanks for the fix! I was having this problem too.

  3. kitchin
    Member
    Posted 2 years ago #

    Great!

  4. KirkM
    Member
    Posted 2 years ago #

    @kitchin - Just to make sure I got this straight as I'm code impaired. :-)

    Line 605 and 606 originally:

    $target_post = get_post($post_id);
    		if (($post_id > 0) && !is_object($target_post))

    So I want to change the two "$post_id" to "$_post_id", yes? So it should read like this:

    $target_post = get_post($_post_id);
    		if (($_post_id > 0) && !is_object($target_post))

    Do I have this right? (yeah, dumb question but I'm getting old--forgetting what I learned when I was a geek)

  5. kitchin
    Member
    Posted 2 years ago #

    Yes, that's it. That makes the code sensible, but I can't vouch for what the code is doing. If you have a test that is not working, make this change and see if it starts working.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Subscribe To Comments Reloaded
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags