• Resolved Ashley

    (@nosegraze)


    I see you’ve added this for 4.4:

    global $post;
    // Quick fix: $post no more available since WordPress 4.4
    if ( is_null( $post ) )  {
    		global $wpdb;
    		$_postid = $wpdb->last_result[0]->ID;
    } else {
    		$_postid = $post->ID;
    }

    I think this might be more reliable instead of using $wpdb:

    $_postid = $commentdata['comment_post_ID']

    The post ID related to that comment should already be available in the $commentdata array. ??

    I added this as a patch initially, which fixed the 4.4 issues, but then downloaded your patch and it stopped working again. So this might be more reliable for other people as well.

    Thanks!

    https://www.ads-software.com/plugins/stop-spam-comments/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fix for 4.4’ is closed to new replies.