Skip to:
Content

Opened 3 years ago

Closed 2 years ago

Last modified 22 months ago

#2973 closed defect (fixed)

PHP Compatibility Checker Errors

Reported by: espellcaste Owned by: johnjamesjacoby
Milestone: 2.6 Priority: normal
Severity: normal Version: 2.5.9
Component: General Keywords: needs-patch good-first-bug
Cc:

Description

Testing bbPress with PHP Compatibility Checker gives these errors:

FILE: /srv/www/irb/htdocs/wp-content/plugins/bbpress/includes/admin/converter.php


FOUND 1 ERROR AFFECTING 1 LINE


310 | ERROR | INI directive 'safe_mode' is deprecated from PHP 5.3 and forbidden from PHP 5.4.


FILE: /srv/www/irb/htdocs/wp-content/plugins/bbpress/includes/admin/parser.php


FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES


293 | ERROR | Deprecated PHP4 style constructor are not supported since PHP7

1149 | ERROR | preg_replace() - /e modifier is forbidden in PHP 7.0
1150 | ERROR | preg_replace() - /e modifier is forbidden in PHP 7.0
1386 | WARNING | The use of function split is discouraged from PHP version 5.3; use preg_split instead


Attachments (1)

2973.diff (2.3 KB) - added by xknown 2 years ago.
Fix PHP 7 incompatibilities

Download all attachments as: .zip

Change History (17)

#1 @johnjamesjacoby
3 years ago

  • Keywords needs-patch good-first-bug added
  • Milestone changed from Awaiting Review to 2.6
  • Owner set to johnjamesjacoby

See also: https://buddypress.trac.wordpress.org/ticket/7184

(I always forget the inter-Trac shorthand.)

Last edited 3 years ago by johnjamesjacoby (previous) (diff)

#2 @lisaleague
3 years ago

Thanks @johnjamesjacoby for following up with me on this.

#3 in reply to: ↑ description @netweb
3 years ago

Replying to espellcaste:

310 | ERROR | INI directive 'safe_mode' is deprecated from PHP 5.3 and forbidden from PHP 5.4.

bbPress only checks for safe_mode /src/includes/admin/converter.php#L317


293 | ERROR | Deprecated PHP4 style constructor are not supported since PHP7
1149 | ERROR | preg_replace() - /e modifier is forbidden in PHP 7.0
1150 | ERROR | preg_replace() - /e modifier is forbidden in PHP 7.0
1386 | WARNING | The use of function split is discouraged from PHP version 5.3; use preg_split instead

We should also merge these parser.php changes to our NBBC fork https://github.com/bbpress/NBBC

This ticket was mentioned in Slack in #bbpress by espellcaste. View the logs.


3 years ago

#5 @netweb
2 years ago

Related: #2987

@xknown
2 years ago

Fix PHP 7 incompatibilities

#6 @riasat
2 years ago

PHP 7.1 issue.

Uncaught Error: [] operator not supported for strings in wp-content/plugins/bbpress/includes/forums/functions.php:1800

<?php
                // Default to public status
                if ( empty( $post_stati ) ) {
                        $post_stati[] = bbp_get_public_status_id();

#7 @johnjamesjacoby
2 years ago

  • Resolution set to fixed
  • Status changed from new to closed

In 6212:

Parser: PHP 7.1 compatibility fixes to parser.php

Props xknown. Fixes #2973. See #2987.

#8 @johnjamesjacoby
2 years ago

Hi @riasat, thanks for your comment here. We did already get around to fixing that for 2.6, as part of #2987. Thanks again for taking the time to let us know your findings. We really appreciate it!

#9 @netweb
2 years ago

Merged r6212 upstream into bbPress' fork of NBBC https://github.com/bbpress/NBBC/pull/1

#10 @riasat
2 years ago

@johnjamesjacoby

A quick question. I'm not familiar with Trac or how BBPress manages its releases. Apologies in advance.

Is there any timeline when these fixes will be released to public? 45 days since last release seems a bit odd to me.

Thanks.

#11 @johnjamesjacoby
2 years ago

45 days since last release seems a bit odd to me.

You're not wrong, no reason to apologize. Releases have always been a bit adrift. We are a small team, working on features & issues in spurts.

The timeline for bbPress 2.6 beta is pretty much wholly dependent on being comfortable with how favorites & subscriptions are upgraded. I'm pretty OK with how it is now, but since there is no backwards compatibility for the old-approach, I think we need to come up with a UI to warn forums with over 10,000 users that they'll need to handle it manually.

It's about 3 hours of work, but I think it's important for the release that it be there.

#12 follow-up: @riasat
2 years ago

Thanks.

I have a freshly developed site that will go live in a few days but the forum part is stuck due to these bugs.

So what are my options to get the PHP7 related fixes? Install the 2.6alpha (link on your download page) on production?

#13 in reply to: ↑ 12 ; follow-up: @netweb
2 years ago

Replying to riasat:

So what are my options to get the PHP7 related fixes? Install the 2.6alpha (link on your download page) on production?

Yes, that would be my suggestion, run beta-2, links to download and discussion can be found here:

https://bbpress.org/forums/topic/bbpress-2-6-beta/

#14 in reply to: ↑ 13 ; follow-up: @riasat
2 years ago

Replying to netweb:

Replying to riasat:

So what are my options to get the PHP7 related fixes? Install the 2.6alpha (link on your download page) on production?

Yes, that would be my suggestion, run beta-2, links to download and discussion can be found here:

https://bbpress.org/forums/topic/bbpress-2-6-beta/

Thank you. One more question.

If I install the "beta 2" over the current version, will I be able to directly update that to 2.6 release?

#15 in reply to: ↑ 14 @netweb
2 years ago

Replying to riasat:

Replying to netweb:

Replying to riasat:

So what are my options to get the PHP7 related fixes? Install the 2.6alpha (link on your download page) on production?

Yes, that would be my suggestion, run beta-2, links to download and discussion can be found here:

https://bbpress.org/forums/topic/bbpress-2-6-beta/

Thank you. One more question.

If I install the "beta 2" over the current version, will I be able to directly update that to 2.6 release?

Yes, if there are any changes between now and the final release of 2.6 we will include an upgrade routine to facilitate any upgrade requirements.

#16 @netweb
22 months ago

In 6418:

Parser: PHP 7.1 compatibility fixes to parser.php

Props xknown.
See #2973, #2987.

Merges [6212] to the 2.5 branch.

Note: See TracTickets for help on using tickets.