WordPress.org

Ready to get started?Download WordPress

Forums

bbPress Threaded Replies
[resolved] PHP error (6 posts)

  1. briantoronto
    Member
    Posted 2 years ago #

    Hi

    I am getting the following error:
    Warning: Invalid argument supplied for foreach() in /home/accnews/public_html/thecommunity/wp-content/plugins/bbpress-threaded-replies/bbpress-threaded-replies.php on line 128
    I am running WP 3.4.1 with bbPress 2.1.2 using PHP 5.2.14
    It is on my dev site, so nothing is broken in production, but any advice would be very helpful.

    Thanks,

    Brian

    http://wordpress.org/extend/plugins/bbpress-threaded-replies/

  2. andrea.ressell
    Member
    Posted 2 years ago #

    Brian, I've got the same problem. Please post if you find a solution.
    Thanks
    Andrea

  3. onomoney
    Member
    Posted 1 year ago #

    I have the same issue after posting a video. public_html/wp-content/plugins/bbpress-threaded-replies/bbpress-threaded-replies.php on line 128
    Here is where it is located http://spraytanit.com/forums/topic/wordpress-settings-writing/

    I just shut the threaded replies plugin off and everything works fine.

  4. induthotla
    Member
    Posted 1 year ago #

    add the if condition to check whether array is empty or not like
    if (is_array($posts)){
    foreach( $posts as $post ) {
    // Ignore the topic if included.
    if ( bbp_get_reply_post_type() == $post->post_type ) {
    $in_reply_to = get_post_meta( $post->ID, '_ucc_btr_in_reply_to', true );
    if ( empty( $in_reply_to ) || ( bbp_get_reply_topic_id( $post->ID ) == $in_reply_to ) )
    $in_reply_to = 0;
    $post->in_reply_to = $in_reply_to;
    $replies[] = $post;
    } elseif ( bbp_get_topic_post_type() == $post->post_type ) {
    delete_post_meta( $post->ID, '_ucc_btr_in_reply_to' );
    }
    }}

  5. onomoney
    Member
    Posted 1 year ago #

    Very cool and thanks.
    Where do we add it to?
    /bbpress-threaded-replies.php on line 128
    maybe!

  6. Jennifer M. Dodd
    Member
    Plugin Author

    Posted 1 year ago #

    This issue should be resolved in the latest version. Please let me know if it fixes this error.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags