From 763a7ecc8fde5ebeaed3d2ba24160c6e37092242 Mon Sep 17 00:00:00 2001 From: Ihor Vansach Date: Thu, 4 Feb 2021 09:56:53 +0200 Subject: [PATCH] Fixed issue 359 CRITICAL: Warning: mb_strpos --- Model/Post.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Model/Post.php b/Model/Post.php index 6b079f45..57619cfd 100755 --- a/Model/Post.php +++ b/Model/Post.php @@ -540,6 +540,7 @@ public function getShortFilteredContent($len = null, $endСharacters = null) /* Skip long HTML */ $stcc = trim(strip_tags($cc)); //if ($stcc && strlen($stcc) < strlen($cc) / 3) { + if ($len < mb_strlen($content)) { $str = ''; $start = false; foreach (explode(' ', $stcc) as $s) { @@ -559,7 +560,7 @@ public function getShortFilteredContent($len = null, $endСharacters = null) $len = $start + $oLen; } } - //} + } } /* Do not cut words */