Skip to:
Content

bbPress.org

Opened 6 weeks ago

Closed 6 weeks ago

Last modified 6 weeks ago

#3299 closed defect (fixed)

PHP 7.4: fix compatibility issue

Reported by: jrf Owned by: johnjamesjacoby
Milestone: 2.6.3 Priority: normal
Severity: normal Version: trunk
Component: API - Importers Keywords: has-patch commit
Cc:

Description

Array and string offset access using curly braces

The array and string offset access syntax using curly braces is deprecated. Use $var[$idx] instead of $var{$idx}.

Source: https://www.php.net/manual/en/migration74.deprecated.php#migration74.deprecated.core.array-string-access-curly-brace

Attachments (1)

trac-3299-php-7.4-compat-curly-braces.patch (731 bytes) - added by jrf 6 weeks ago.

Download all attachments as: .zip

Change History (6)

#1 @jrf
6 weeks ago

Note: this patch fixes all violations against the PHPCompatibility.Syntax.RemovedCurlyBraceArrayAccess.Found sniff. See #3294

#2 @johnjamesjacoby
6 weeks ago

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

In 7014:

Converters: PHP7.4 code compatibility.

This commit uses the correct array syntax in the Invision converter, to avoid fatal erroring in PHP7.4+.

Props jrf. Fixes #3299. For 2.6.3, branches/2.6.

#3 @johnjamesjacoby
6 weeks ago

In 7015:

Converters: PHP7.4 code compatibility.

This commit uses the correct array syntax in the Invision converter, to avoid fatal erroring in PHP7.4+.

Props jrf. Fixes #3299. For 2.7, trunk.

#4 @johnjamesjacoby
6 weeks ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 2.6.3

#5 @jrf
6 weeks ago

Just FYI for anyone coming across this issue: this isn't a fatal error in PHP 7.4 yet, just a deprecation warning, but it is expected that it will be a fatal in PHP 8.

Note: See TracTickets for help on using tickets.