Skip to content

Commit 763a7ec

Browse files
committed
Fixed issue 359 CRITICAL: Warning: mb_strpos
1 parent 998e8f6 commit 763a7ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Model/Post.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,7 @@ public function getShortFilteredContent($len = null, $endСharacters = null)
540540
/* Skip long HTML */
541541
$stcc = trim(strip_tags($cc));
542542
//if ($stcc && strlen($stcc) < strlen($cc) / 3) {
543+
if ($len < mb_strlen($content)) {
543544
$str = '';
544545
$start = false;
545546
foreach (explode(' ', $stcc) as $s) {
@@ -559,7 +560,7 @@ public function getShortFilteredContent($len = null, $endСharacters = null)
559560
$len = $start + $oLen;
560561
}
561562
}
562-
//}
563+
}
563564
}
564565

565566
/* Do not cut words */

0 commit comments

Comments
 (0)