viewgit/inc/functions.php:22 Function utf8_encode() is deprecated [8192]
Filename | |
---|---|
src/models/Model.php |
diff --git a/src/models/Model.php b/src/models/Model.php index 0eefba619..5f757a837 100755 --- a/src/models/Model.php +++ b/src/models/Model.php @@ -373,9 +373,10 @@ class Model implements CrawlConstants if (mb_strlen($snippet_string) >= $description_length) { $snippet_string = mb_substr($snippet_string, 0, $description_length); - $rpos = strrpos($snippet_string, " "); - if ($rpos) { - $snippet_string = mb_substr($snippet_string, 0, $rpos); + $test_snippet = preg_replace('/[^\s]+$/', "", + $snippet_string); + if(!empty($test_snippet)) { + $snippet_string = $test_snippet; } break; }