Skip to:
Content
Pages
Categories
Search
Top
Bottom

bbPress is no longer working when I tried to upgrade to PHP 7.1.8


  • khaleds
    Participant

    @khaleds

    I’ve upgrade my PHP version to 7.1.8
    Everything works just fine, only bbPress forum stopped working!
    see the error in the debug:
    PHP Fatal error: Uncaught Error: [] operator not supported for strings in /home/******/public_html/wp-content/plugins/bbpress/includes/forums/functions.php:1800
    Stack trace:
    #0 /home/******/public_html/wp-includes/class-wp-hook.php(298): bbp_pre_get_posts_normalize_forum_visibility(Object(WP_Query))
    #1 /home/******/public_html/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)
    #2 /home/******/public_html/wp-includes/plugin.php(515): WP_Hook->do_action(Array)
    #3 /home/******/public_html/wp-includes/class-wp-query.php(1683): do_action_ref_array(‘pre_get_posts’, Array)
    #4 /home/******/public_html/wp-includes/class-wp-query.php(3248): WP_Query->get_posts()
    #5 /home/******/public_html/wp-includes/class-wp.php(617): WP_Query->query(Array)
    #6 /home/******/public_html/wp-includes/class-wp.php(735): WP->query_posts()
    #7 /home/******/public_html/wp-includes/functions.php(955): WP->main(”)
    #8 /home/******/public_html/wp-blog-header.php(16): wp()
    #9 /home/******/public_htm in /home/******/public_html/wp-content/plugins/bbpress/includes/forums/functions.php on line 1800

Viewing 2 replies - 1 through 2 (of 2 total)

  • Robin W
    Moderator

    @robin-w

    so 3 fixes
    1. downgrade to a lesser version of php
    2. upgrade to bbpress 2.6rc3
    3. in bbpress 2.5.13 in includes/forums/functions.php
    change line 1851 from
    $meta_query = $posts_query->get( ‘meta_query’ );

    to
    $meta_query = $posts_query->get( ‘meta_query’, array() );

    and change line 1796 from
    $post_stati = $posts_query->get( 'post_status' );

    to

    $post_stati = $posts_query->get( ‘post_status’ ); 
    if (!is_array($post_stati)){
                                                 $post_stati = array($post_stati);
    }

    khaleds
    Participant

    @khaleds

    I did the 2nd choice (upgrade to bbpress 2.6rc3) and it works just fine.
    Thank you Robin

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar