Skip to content

Commit

Permalink
Update ShortContentExtractor.php
Browse files Browse the repository at this point in the history
  • Loading branch information
magefan authored Mar 31, 2023
1 parent 50fbd63 commit 768ae0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Model/ShortContentExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@ public function execute($content, $len = null, $endCharacters = null)

/* Do not cut words */
while ($len < mb_strlen($content)
&& !in_array($content[$len], [' ', '<', "\t", "\r", "\n"])) {
&& !in_array(mb_substr($content, $len, 1), [' ', '<', "\t", "\r", "\n"])) {
$len++;
}

$content = mb_strcut($content, 0, $len);
$content = mb_substr($content, 0, $len);
try {
$previousErrorState = libxml_use_internal_errors(true);
$dom = new \DOMDocument();
Expand Down

0 comments on commit 768ae0e

Please sign in to comment.