Skip to content
Permalink
Browse files

Dumper::truncateString() fixed for ''

  • Loading branch information...
dg committed Nov 2, 2019
1 parent 6eb6784 commit ba950921642b407964c62b9d612e9b0ed6754ee5
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/Tracy/Dumper/Dumper.php
@@ -539,12 +539,13 @@ public static function truncateString(string $s, int $maxLength): string
$s = mb_substr($s, 0, $maxLength, 'UTF-8');
} else {
$i = $len = 0;
do {
while (isset($s[$i])) {
if (($s[$i] < "\x80" || $s[$i] >= "\xC0") && (++$len > $maxLength)) {
$s = substr($s, 0, $i);
break;
}
} while (isset($s[++$i]));
$i++;
}
}
return $s;
}

0 comments on commit ba95092

Please sign in to comment.
You can’t perform that action at this time.