diff --git a/.gitignore b/.gitignore index 16d382c..9559c01 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ /src/autoload.php .idea/ + +.DS_Store diff --git a/src/kint-php/kint/inc/kintParser.class.php b/src/kint-php/kint/inc/kintParser.class.php index 48153dc..9d7ec82 100644 --- a/src/kint-php/kint/inc/kintParser.class.php +++ b/src/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 ); diff --git a/src/kint-php/kint/parsers/custom/color.php b/src/kint-php/kint/parsers/custom/color.php index c213c01..cfd1765 100644 --- a/src/kint-php/kint/parsers/custom/color.php +++ b/src/kint-php/kint/parsers/custom/color.php @@ -82,16 +82,16 @@ private static function _convert( $color ) $color = self::$_css3Named[ $color ]; } - if ( $color{0} === '#' ) { + if ( $color[0] === '#' ) { $variants['hex'] = $color; $color = substr( $color, 1 ); if ( strlen( $color ) === 6 ) { $colors = str_split( $color, 2 ); } else { $colors = array( - $color{0} . $color{0}, - $color{1} . $color{1}, - $color{2} . $color{2}, + $color[0] . $color[0], + $color[1] . $color[1], + $color[2] . $color[2], ); } diff --git a/src/kint-php/kint/parsers/custom/json.php b/src/kint-php/kint/parsers/custom/json.php index f752a21..0a57864 100644 --- a/src/kint-php/kint/parsers/custom/json.php +++ b/src/kint-php/kint/parsers/custom/json.php @@ -6,7 +6,7 @@ protected function _parse( & $variable ) { if ( !KINT_PHP53 || !is_string( $variable ) - || !isset( $variable{0} ) || ( $variable{0} !== '{' && $variable{0} !== '[' ) + || !isset( $variable[0] ) || ( $variable[0] !== '{' && $variable[0] !== '[' ) || ( $json = json_decode( $variable, true ) ) === null ) return false;