Skip to content

Commit

Permalink
Fixed issue 359 CRITICAL: Warning: mb_strpos
Browse files Browse the repository at this point in the history
  • Loading branch information
ihorvansach committed Feb 4, 2021
1 parent 998e8f6 commit 763a7ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Model/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -559,7 +560,7 @@ public function getShortFilteredContent($len = null, $endСharacters = null)
$len = $start + $oLen;
}
}
//}
}
}

/* Do not cut words */
Expand Down

0 comments on commit 763a7ec

Please sign in to comment.