BuddyBoss Home – Web Support Forums Themes OneSocial theme Parse error: syntax error, unexpected '['

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Question

    #56962

    Hi there,

    I really like the new Social Theme. Unfortunately I get an error when activating it.
    I just installed it on my test network site to see if it work fine with other plugins that I’m using on my official site. And this is the error I get:

    Parse error: syntax error, unexpected ‘[‘ in /…/…/public_html/wp-content/themes/onesocial/buddyboss-inc/post-like.php on line 446

    My test site URL is:
    http://edulink.co.nz/

    Answers

    #56964
    @vapvarun

    Hi @rotju,

    Sorry for the inconvenience.

    Please modify onesocial/buddyboss-inc/post-like.php on line 446

    
    replace line 
    $you_removed = array_diff( $post_users, [get_current_user_id()] );
    with 
    $you_removed = array_diff( $post_users, array( get_current_user_id() ) ); 
    

    Regards
    Varun Dubey

    #56966
    @vapvarun

    Hi @rotju if you can update PHP version to 5.4+ , it will work without any code edits
    https://wordpress.org/about/requirements/
    To run WordPress we recommend your host supports:
    PHP version 5.6 or greater
    MySQL version 5.6 or greater

    Regards
    Varun Dubey

    #56985

    Awesome! Thank you @vapvarun
    That worked beautifully. I also updated the PHP version. I though I already updated it to 5.4… but clearly I didnt. It’s all good now.

    Cheers,
    Ronald

    #57043
    @vapvarun

    Great, I will close this topic
    Regards
    Varun Dubey

Viewing 5 posts - 1 through 5 (of 5 total)
  • The question ‘Parse error: syntax error, unexpected '['’ is closed to new replies.