From e55cf315783abb4e9e85d61534a9a1e13dfdf093 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 24 Apr 2012 11:48:47 -0500 Subject: [PATCH] dont cast to string in str::words method. --- laravel/str.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laravel/str.php b/laravel/str.php index 9bdc9b1c..21e15475 100644 --- a/laravel/str.php +++ b/laravel/str.php @@ -148,7 +148,7 @@ class Str { */ 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);