add u PCRE modifier to str::words.

This commit is contained in:
Taylor Otwell 2012-05-03 08:37:52 -05:00
parent 4f036cf7dd
commit 280bc99ed8
1 changed files with 1 additions and 1 deletions

View File

@ -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]))
{