[buddypress-trac] [BuddyPress Trac] #7040: PHP 7.0 Fatal Errors

buddypress-trac noreply at wordpress.org
Fri Apr 29 23:47:21 UTC 2016


#7040: PHP 7.0 Fatal Errors
--------------------------------+-----------------------------
 Reporter:  TJNowell            |      Owner:
     Type:  defect (bug)        |     Status:  new
 Priority:  high                |  Milestone:  Awaiting Review
Component:  Component - Forums  |    Version:  2.5.0
 Severity:  major               |   Keywords:
--------------------------------+-----------------------------
 There are a number of syntax fatal errors in the latest BP and trunk BP.
 These can be found using the following bash command:


 {{{
 find . -type f -name '*.php' -exec php -l {} \; |grep -v "No syntax errors
 detected"
 }}}

 Resulting in numerous deprecation warnings and these fatal errors, with
 the errors coming from the bp-forum component:

 {{{

 Parse error: syntax error, unexpected 'new' (T_NEW) in ./src/bp-
 forums/bbpress/bb-admin/includes/class.bb-install.php on line 1283

 Errors parsing ./src/bp-forums/bbpress/bb-admin/includes/class.bb-
 install.php


 Parse error: syntax error, unexpected 'new' (T_NEW) in ./src/bp-
 forums/bbpress/bb-includes/backpress/class.wp-taxonomy.php on line 586

 Errors parsing ./src/bp-forums/bbpress/bb-includes/backpress/class.wp-
 taxonomy.php

 Parse error: syntax error, unexpected 'new' (T_NEW) in ./src/bp-
 forums/bbpress/bb-includes/backpress/functions.wp-object-cache.php on line
 108

 Errors parsing ./src/bp-forums/bbpress/bb-includes/backpress/functions.wp-
 object-cache.php

 Parse error: syntax error, unexpected '&' in ./src/bp-forums/bbpress/bb-
 includes/backpress/functions.wp-taxonomy.php on line 179

 Errors parsing ./src/bp-forums/bbpress/bb-includes/backpress/functions.wp-
 taxonomy.php


 Parse error: syntax error, unexpected 'new' (T_NEW) in ./src/bp-
 forums/bbpress/bb-includes/backpress/pomo/mo.php on line 171

 Errors parsing ./src/bp-forums/bbpress/bb-includes/backpress/pomo/mo.php

 Parse error: syntax error, unexpected 'new' (T_NEW) in ./src/bp-
 forums/bbpress/bb-includes/backpress/pomo/sample/app.php on line 36

 Errors parsing ./src/bp-forums/bbpress/bb-
 includes/backpress/pomo/sample/app.php

 Parse error: syntax error, unexpected 'new' (T_NEW) in ./src/bp-
 forums/bbpress/bb-includes/functions.bb-l10n.php on line 484

 Errors parsing ./src/bp-forums/bbpress/bb-includes/functions.bb-l10n.php

 Parse error: syntax error, unexpected 'new' (T_NEW) in ./src/bp-
 forums/bbpress/bb-settings.php on line 188

 Errors parsing ./src/bp-forums/bbpress/bb-settings.php

 }}}

 They appear to be from lines that use:

 {{{
  =& new
 }}}

 Which is necessary in PHP 4.0 to retain the reference, but not needed in
 the PHP 5 object model, and broken in PHP 7

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


More information about the buddypress-trac mailing list