Skip to:
Content
Pages
Categories
Search
Top
Bottom

Fatal error PHP 7.1


  • Stagger Lee
    Participant

    @stagger-lee

    Does BuddyPress work with PHP versions 7.1 ?
    In 7.0 version it is OK seems as.

    Problem is in bp-core-dependency.php, line 143 “do_action( ‘bp_setup_admin_bar’ );”

    Here is full error:

    Fatal error: Uncaught Error: [] operator not supported for strings in D:\UniServerZ\www\custom\wp-content\plugins\buddypress\bp-activity\classes\class-bp-activity-component.php:281 
    Stack trace: #0 D:\UniServerZ\www\custom\wp-includes\plugin.php(524): BP_Activity_Component->setup_admin_bar('') #1 D:\UniServerZ\www\custom\wp-content\plugins\buddypress\bp-core\bp-core-dependency.php(143): do_action('bp_setup_admin_...') #2 
    D:\UniServerZ\www\custom\wp-includes\plugin.php(600): bp_setup_admin_bar(Object(WP_Admin_Bar)) #3 
    D:\UniServerZ\www\custom\wp-includes\admin-bar.php(83): do_action_ref_array('admin_bar_menu', Array) #4 
    D:\UniServerZ\www\custom\wp-includes\plugin.php(524): wp_admin_bar_render('') #5 
    D:\UniServerZ\www\custom\wp-admin\admin-header.php(214): do_action('in_admin_header') #6 
    D:\UniServerZ\www\custom\wp-admin\index.php(102): include('D:\\UniServerZ\\w...') #7 {main} thrown in D:\UniServerZ\www\custom\wp-content\plugins\buddypress\bp-activity\classes\class-bp-activity-component.php on line 281
Viewing 11 replies - 1 through 11 (of 11 total)

  • Stagger Lee
    Participant

    @stagger-lee

    Yes, I see now it is RC2 version of PHP. Get lost, why I am using it.
    Stable version is 7.0.1, that tricked me.

    Anyway it is here if you want to take a look. It is waiting for you anyway.


    r-a-y
    Keymaster

    @r-a-y

    Let us know when PHP 7.1 is final and then we’ll take a look at it 🙂


    lgreenwoo
    Participant

    @lgreenwoo

    PHP 7.1 Final is due on December 1st and this issue is still present in the final RC (PHP 7.1 RC6).

    It looks like BBPress had a similar issue, which they’ve now fixed… https://bbpress.trac.wordpress.org/ticket/2987


    lgreenwoo
    Participant

    @lgreenwoo

    I see that BP 2.7.3 is due the day before PHP 7.1 GA. Perhaps a fix can be included in this release so there’s no lag between PHP 7.1 GA and BP working on PHP 7.1 – otherwise I assume we’ll be waiting for BP 2.7.4?

    https://buddypress.trac.wordpress.org/milestone/2.7.3


    jonieske
    Participant

    @jonieske

    The problem is still present.

    Quickly looking into source, it looks like the issue is with do_action‘s default first arg being an empty string.

    I’ve fixed it at least temporarily by setting bp_setup_admin_bar action parameter explicitly:
    do_action( 'bp_setup_admin_bar', array() );

    Thanks for finding that one.

    I’m trying to get someone from the WordPress team to confirm some details on their PHP 7.1 support, and once I have that, I’ll reply here again.

    Okay. The story is that PHP 7.1 is supported by WordPress 4.7 (or newer). Likewise, BuddyPress will need at least that version, too.

    We’re currently tracking some unit test failures in PHP 7.1 (see the very bottom of https://travis-ci.org/buddypress/BuddyPress), but we’ve not figured out if they are our bugs, or some bug in WordPress core. Likewise, this do_action issue might be a regression WordPress should fix instead of us (if we’re getting caught by this, I bet many other plugins are, too).

    At any rate, I’m going to try to fix the unit tests once I get a PHP 7.1 box set up (hopefully this week), and then I’ll test the basics of BuddyPress, and see what other issues crop up, and fix or report them as necessary.

    I think I’d wait a month or two to use PHP 7.1 with WordPress and BuddyPress in the wild, to be honest.


    lgreenwoo
    Participant

    @lgreenwoo

    Just jumping back in on this one.

    I’ve been developing a large & complex WP site (60+ CPTs using Pods & BP) for the past few months on PHP 7.1. I ran all PHP 7.1 RCs and so far the only issues I’ve seen are related to BP. I’m now at the point where I’ve had to disable BP to continue development on PHP 7.1 (I need nullable types and void returns from PHP 7.1) and ignore any BP features I have on my roadmap until it’s stable (I hope soon 🙂 )

    I can’t report any issues with WP-core and PHP 7.1 that I’ve witnessed.

    No trying to say that BP is crappy 🙂 – just a hint that the issue may be more likely to be on BP side (especially since it seems that BBPress had a similar issue which they’ve already fixed – see my link in previous post).

    The other issue I’m seeing on PHP 7.1 seems to be related to enabling Opcache and BP – https://buddypress.trac.wordpress.org/ticket/7361

    Hope that’s helpful 🙂

    I don’t disagree but until someone sets up PHP 7.1 locally, tests and patches everything, which is then signed-off by a regular contributor (also requiring a PHP 7.1) process, things are going to move slow. This is a volunteer project. Hopefully by next week we should see some fixes.

    The situation is BuddyPress is incompatible with PHP 7.1 as things stand. One issue means a fix in BuddyPress (which we’ve already fixed, and will have out in a release soon, but probably after Christmas), and the other issue I’ve found (which BP sites have a realistic site of running into) require a fix in WordPress, which I hope that team will get done for WP 4.7.1.

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