WordPress.org

Making WordPress.org

#3653 closed defect (fixed)

Fix fatal error in wporg-developer theme

Reported by: keesiemeijer Owned by: obenland
Milestone: Priority: normal
Component: Developer Hub Keywords: has-patch
Cc:

Description

With PHP 7.2.5 I get this error:

Fatal error: Uncaught Error: Cannot use string offset as an array in /srv/www/wp-reference/public/wp-content/themes/wporg-developer/inc/template-tags.php:786

This is because a string variable is used as an array. The following patch will instantiate the variable as an array.

Attachments (1)

3653.patch (659 bytes) - added by keesiemeijer 14 months ago.
Create variable as array

Download all attachments as: .zip

Change History (2)

@keesiemeijer
14 months ago

Create variable as array

#1 @obenland
14 months ago

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

In 7269:

Developer: Avoid error in PHP 7.2

Props keesiemeijer.
Fixes #3653.

Note: See TracTickets for help on using tickets.