From e0a06b23ed78b7f5ddaee243954d7f1e07de695d Mon Sep 17 00:00:00 2001 From: SavvyPro <56563860+SavvyProSolutions@users.noreply.github.com> Date: Thu, 18 Feb 2021 18:25:55 -0800 Subject: [PATCH] Update kintParser.class.php I was receiving the following PHP errors after activating the plugin in my local dev environment because I have PHP version 8.0.1 installed: ======================================================== Fatal error: Array and string offset access syntax with curly braces is no longer supported in "Site/app/public/wp-content/plugins/UpDevTools/vendor/kint-php/kint/inc/kintParser.class.php" ======================================================== I simply updated lines 463 and 465 to use brackets instead of curly braces. --- vendor/kint-php/kint/inc/kintParser.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vendor/kint-php/kint/inc/kintParser.class.php b/vendor/kint-php/kint/inc/kintParser.class.php index 48153dc..32cde7f 100644 --- a/vendor/kint-php/kint/inc/kintParser.class.php +++ b/vendor/kint-php/kint/inc/kintParser.class.php @@ -460,9 +460,9 @@ private static function _parse_object( &$variable, kintVariableData $variableDat * These prepended values have null bytes on either side. * http://www.php.net/manual/en/language.types.array.php#language.types.array.casting */ - if ( $key{0} === "\x00" ) { + if ( $key[0] === "\x00" ) { - $access = $key{1} === "*" ? "protected" : "private"; + $access = $key[1] === "*" ? "protected" : "private"; // Remove the access level from the variable name $key = substr( $key, strrpos( $key, "\x00" ) + 1 ); @@ -605,4 +605,4 @@ private static function _parse_unknown( &$variable, kintVariableData $variableDa $variableData->value = var_export( $variable, true ); } -} \ No newline at end of file +}