dont cast to string in str::words method.

This commit is contained in:
Taylor Otwell 2012-04-24 11:48:47 -05:00
parent 68834a47d9
commit e55cf31578
1 changed files with 1 additions and 1 deletions

View File

@ -148,7 +148,7 @@ public static function limit($value, $limit = 100, $end = '...')
*/
public static function words($value, $words = 100, $end = '...')
{
if (trim((string) $value) == '') return '';
if (trim($value) == '') return '';
preg_match('/^\s*+(?:\S++\s*+){1,'.$words.'}/', $value, $matches);