#7040 closed defect (bug) (no action required)
PHP 7.0 Fatal Errors
Reported by: | TJNowell | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.5.0 |
Component: | Forums | Keywords: | |
Cc: |
Description
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
Change History (5)
#1
@
9 years ago
- Milestone Awaiting Review deleted
- Priority changed from high to normal
- Resolution set to invalid
- Severity changed from major to normal
- Status changed from new to closed
#4
@
8 years ago
@mcyger BuddyPress works with PHP7.
What this ticket referred to is some software that's bundled with BuddyPress called bbPress (version 1). This is not used by default, and, in fact, you have to go out of your way to get this code to load nowadays. This will only be a problem if you are using bbPress 1 on your site, which may be the case if you have a BuddyPress site that's been running since about 5 or 6 years ago.
If you are using bbPress 2 (which is distributed as another WordPress plugin), or if you are not using forums at all, you do not need to worry.
If you are using bbPress 1, then this is an issue that would need to be addressed by the bbPress development team -- and as they're on version 2, I think there is very little interest in someone updating bbPress 1. At any rate, that issue would be tracked at https://bbpress.trac.wordpress.org/, not here.
#5
@
8 years ago
See also #7184 and #bbPress2973
This is a bbPress issue and to note is already currently being worked on by @boonebgorges and @johnjamesjacoby