Skip to content

Commit

Permalink
Fixing truncate problem
Browse files Browse the repository at this point in the history
  • Loading branch information
architeacher committed Apr 14, 2015
1 parent c9bc929 commit cf40dec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Utility/Text.php
Expand Up @@ -591,7 +591,7 @@ public static function truncate($text, $length = 100, array $options = [])
$truncate = mb_substr($truncate, 0, $spacepos);
}
// If truncate still empty, then we don't need to count ellipsis in the cut.
if(!isset($truncate)){
if(mb_strlen($truncate) == 0){

$truncate = mb_substr($text, 0, $length);
}
Expand Down

0 comments on commit cf40dec

Please sign in to comment.