Skip to content

Commit e55cf31

Browse files
committed
dont cast to string in str::words method.
1 parent 68834a4 commit e55cf31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

laravel/str.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public static function limit($value, $limit = 100, $end = '...')
148148
*/
149149
public static function words($value, $words = 100, $end = '...')
150150
{
151-
if (trim((string) $value) == '') return '';
151+
if (trim($value) == '') return '';
152152

153153
preg_match('/^\s*+(?:\S++\s*+){1,'.$words.'}/', $value, $matches);
154154

0 commit comments

Comments
 (0)