[PHP 7.4] curly brace usage with strings

Created on 5 August 2020, over 4 years ago
Updated 9 August 2023, over 1 year ago

Problem/Motivation

Checking for PHP version 7.4 compatibility yields this:

FILE: colorfield.module
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 12 WARNINGS AFFECTING 6 LINES
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 137 | WARNING | [x] Curly brace syntax for accessing array elements and string offsets has been deprecated in PHP 7.4. Found: $raw_value{0}
     |         |     (PHPCompatibility.Syntax.RemovedCurlyBraceArrayAccess.Found)
...
(etc.)

Steps to reproduce

Proposed resolution

Replace curly braces with square brackets. Functionality should remain exactly the same.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

RTBC

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States ndewhurst USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024