BUG: Undefined $post_id
-
I’m accessing the function
add_subscription
directly from within in my theme and it kept failing. I tracked it down to a typo in the function.Lines 611-616:
public function add_subscription($_post_id = 0, $_email = '', $_status = 'Y'){ global $wpdb; // Does the post exist? $target_post = get_post($post_id); if (($post_id > 0) && !is_object($target_post))
… the last two lines should be using
$_post_id
instead of$post_id
.https://www.ads-software.com/plugins/subscribe-to-comments-reloaded/
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘BUG: Undefined $post_id’ is closed to new replies.