Skip to:
Content
Pages
Categories
Search
Top
Bottom

Fatal error: Uncaught Error: [] operator not supported – any clues?


  • VinceS2
    Participant

    @vinces2

    Hi,
    I am using the bbPress forum at the moment for one way communication – later I expect it to become more interactive but for now it is more a record of the underlying story and issues. So I don’t check it often, last time was a month ago. Now it went to 404’s and page missing for everything. So I got the bright idea to run the Tool to repair it and selected everything. Now I only get errors for forums but the topics are working again.

    See https://www.vrdriversim.com.au/forums/forum/technical/ for an example of the problem. Here is an excerpt, with myaddress inserted where my actual address was. Its a security thing for the long term.

    Fatal error: Uncaught Error: [] operator not supported for strings in /home/myaddress/public_html/wp-content/plugins/bbpress/includes/forums/functions.php:1800 Stack trace: #0 /home/myaddress/public_html/wp-includes/class-wp-hook.php(298): bbp_pre_get_posts_normalize_forum_visibility(Object(WP_Query)) #1 /home/myaddress/public_html/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array) #2

    Yet in the WP admin panel I can see all the forums and they look fine. Here is an example of a working topic link: https://www.vrdriversim.com.au/forums/topic/green-screening/ which is a topic in the earlier given error example forum link.

    I am also struggling to find exactly where the real files should be, so I can look there and see if they exist, or deal with restoring from back-ups, which I have, if necessary – once I understand what has gone wrong here in the first place! Could it be WP 4.8? I am on php 7.0.21, Apache server

    I tried disable all other plugins, no apparent difference. I turned them all back on, still the same. Tried installing 2012 theme, no change (to forum link fails).

    Over the last few days I have regularly deactivated and reactivated bbPress as part of working with the author of another plugin to find out why their admin panel is behaving weirdly (basically scripts not running without a page refresh or at all). So does deactivating bbPress break it at some level? Seems, from other posts here, it does for others, sometimes. Me too? How, or how fix is the more important q – stopping the behaviour comes later…

    I posted this topic here: https://bbpress.org/forums/topic/vanished-forum-but-topics-remain-is-it-a-wp-4-8-issue/ but it isn’t listed in Troubleshooting and my profile says I haven’t started any topics. More weirdness. So 24hrs later I am trying again, few more details this time.

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

  • Robin W
    Moderator

    @robin-w

    Suspect you are using php 7.1
    so 3 fixes
    1. downgrade to a lesser version of php
    2. upgrade to bbpress 2.6rc3
    3. in bbpress 2.5.12 change line 1851 from
    $meta_query = $posts_query->get( ‘meta_query’ );
    to
    $meta_query = $posts_query->get( ‘meta_query’, array() );
    Since the next upgrade will fix that anyway, no issue in changing the bbpress file
    best I can offer I’m afraid


    VinceS2
    Participant

    @vinces2

    Yay, thanks for the tip Robin. All directories were on php version 7.0.21 but public_html was on 7.1.7. Changed it back to 7.0.21 and hey presto, all working again. Thank you, Thank you Thank you!!!


    VinceS2
    Participant

    @vinces2

    For anyone Googling their way here, php version is checked and adjusted through php Version Manager in cPanel – grouped under 1H Software in the version my host (SiteGround) uses.


    Robin W
    Moderator

    @robin-w

    version 2.5.13 just released should fix this issue


    VinceS2
    Participant

    @vinces2

    Well I can report with 2.5.13 it has stayed fixed. I haven’t messed around changing php versions later than 7.0.21 as we are in “if it ain’t broke…” territory!

    Thanks again


    Robin W
    Moderator

    @robin-w

    great, and thanks for the feedback


    useStrict
    Participant

    @usestrict

    I’m also using PHP 7.1. I fixed it by changing line 1800 to cast the value as an array.

    if ( empty( $post_stati ) ) {
                $post_stati = (array) bbp_get_public_status_id();

    Waiting for 2.6 release soon.

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