From 280bc99ed8963d5d4d9a304b11e44fa9227db0c6 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 3 May 2012 08:37:52 -0500 Subject: [PATCH] add u PCRE modifier to str::words. --- laravel/str.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laravel/str.php b/laravel/str.php index 21e15475..964b5d5b 100644 --- a/laravel/str.php +++ b/laravel/str.php @@ -150,7 +150,7 @@ public static function words($value, $words = 100, $end = '...') { if (trim($value) == '') return ''; - preg_match('/^\s*+(?:\S++\s*+){1,'.$words.'}/', $value, $matches); + preg_match('/^\s*+(?:\S++\s*+){1,'.$words.'}/u', $value, $matches); if (static::length($value) == static::length($matches[0])) {