Skip to content

PHP 7.4 deprecates curly braces for array and string offset access #1

@jdorner4

Description

@jdorner4

Love the plugin!!! THANK YOU!!!

With PHP7.4, array and string offset access syntax with curly braces is deprecated

https://stackoverflow.com/questions/12769982/reference-what-does-this-error-mean-in-php/59158847#59158847

PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in \wp-content\plugins\kint-php-debugger\src\kint-php\kint\inc\kintParser.class.php on line 463

PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in \wp-content\plugins\kint-php-debugger\src\kint-php\kint\inc\kintParser.class.php on line 465

Easy fix - replace line 463:
if ( $key{0} === "\x00" ) {
with:
if ( $key[0] === "\x00" ) {

and line 465:
$access = $key{1} === "*" ? "protected" : "private";
with:
$access = $key[1] === "*" ? "protected" : "private";

Hope this helps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions