Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
/src/autoload.php

.idea/

.DS_Store
4 changes: 2 additions & 2 deletions src/kint-php/kint/inc/kintParser.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
8 changes: 4 additions & 4 deletions src/kint-php/kint/parsers/custom/color.php
Original file line number Diff line number Diff line change
Expand Up @@ -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],
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/kint-php/kint/parsers/custom/json.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down