Skip to content

Commit 7220259

Browse files
committed
Merge pull request #71 from mcd-php/patch-1
FIX: Crash on @thobbs/phpcassa objects with UUIDs
2 parents bcd082f + 3cde31b commit 7220259

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

parsers/parser.class.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ protected static function _detectEncoding( $value )
508508
}
509509

510510
if ( empty( Kint::$charEncodings ) || !function_exists( 'iconv' ) ) {
511-
return isset( $mbDetected ) ? $mbDetected : 'UTF-8';
511+
return !empty( $mbDetected ) ? $mbDetected : 'UTF-8';
512512
}
513513

514514
$md5 = md5( $value );
@@ -568,4 +568,4 @@ protected static function _substr( $string, $end, $encoding = null )
568568
? mb_substr( $string, 0, $end, $encoding )
569569
: substr( $string, 0, $end );
570570
}
571-
}
571+
}

0 commit comments

Comments
 (0)