Skip to content

Commit 6fc7c5a

Browse files
authored
Update class.summary.php
fix for mb_strrpos depreciation with php7.4
1 parent a0c6aed commit 6fc7c5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

assets/lib/class.summary.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @author Agel_Nash <[email protected]>
1111
* @see http://blog.agel-nash.ru/addon/summary.html
1212
* @date 31.07.2013
13-
* @version 1.0.3
13+
* @version 1.0.4
1414
*/
1515
include_once(MODX_BASE_PATH . 'assets/lib/APIHelpers.class.php');
1616

@@ -283,7 +283,7 @@ protected function textTrunc($string, $limit, $break = ". ")
283283
}
284284

285285
$string = mb_substr($string, 0, $limit, 'UTF-8');
286-
if (false !== ($breakpoint = mb_strrpos($string, $break, 'UTF-8'))) {
286+
if (false !== ($breakpoint = mb_strrpos($string, $break, 0, 'UTF-8'))) {
287287
$string = mb_substr($string, 0, $breakpoint + 1, 'UTF-8');
288288
} else {
289289
if ($break != ' ') {

0 commit comments

Comments
 (0)