[buddypress-trac] [BuddyPress Trac] #7838: Parse Error when running WP-CLI under PHP 5.3

buddypress-trac noreply at wordpress.org
Fri May 18 22:07:26 UTC 2018


#7838: Parse Error when running WP-CLI under PHP 5.3
--------------------------+-----------------------------
 Reporter:  ucsdmatthew   |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Core          |    Version:  3.0.0
 Severity:  minor         |   Keywords:
--------------------------+-----------------------------
 I use wp-cli to automate maintenance of a self-hosted wordpress (currently
 4.9.6) multisite installation, running under a long-term support version
 of Centos 6, which includes PHP 5.3 (with backported security patches).

 After updating today to BuddyPress 3.0.0, when running wp-cli, we're now
 seeing the error:

 {{{
 Parse error: syntax error, unexpected '[' in /path/to/wordpress/wp-
 content/plugins/buddypress/cli/components/activity.php on line 902
 }}}

 The relevant line of code from that file is:

 {{{
 $r['item-id'] = \BP_Groups_Group::get_random( 1, 1 )['groups'][0]->slug;
 }}}

 It appears that this line (which appears twice in activity.php, as well as
 once in group-invite.php) uses syntax introduced in PHP 5.4 (function
 array dereferencing). The readme specifies a system requirement of PHP
 5.3+, so presumably the use of incompatible syntax is a bug.

 Thank you!
 -Matthew

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7838>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list