From a07077ac2c89b1c5bfae2d9d962a14e8cd356bea Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 29 Jan 2026 11:29:23 +0100 Subject: [PATCH] #7950 @0.25 --- src/Text.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Text.php b/src/Text.php index 62dab5a..8bb6004 100644 --- a/src/Text.php +++ b/src/Text.php @@ -319,7 +319,7 @@ class Text public static function splitWordsWithCase($str) { $non_word = '\x{0000}-\x{002F}\x{003A}-\x{0040}\x{005b}-\x{0060}\x{007B}-\x{007E}\x{00A0}-\x{00BF}\s'; - if (preg_match_all('/([^' . $non_word . ']{3,})/msu', html::clean($str), $match)) { + if (preg_match_all('/([^' . $non_word . ']{3,})/msu', $str, $match)) { foreach ($match[1] as $i => $v) { $match[1][$i] = $v; } @@ -647,7 +647,8 @@ class Text return $text; } - public static function fileGetContentsNormalizedLines($path){ + public static function fileGetContentsNormalizedLines($path) + { return static::normalizeLines(file_get_contents($path)); } @@ -836,13 +837,13 @@ class Text public static function splitWords($str, $minChar = 3) { $non_word = '\x{0000}-\x{002F}\x{003A}-\x{0040}\x{005b}-\x{0060}\x{007B}-\x{007E}\x{00A0}-\x{00BF}\s'; - if (preg_match_all('/([^' . $non_word . ']{' . $minChar . ',})/msu', html::clean($str), $match)) { + if (preg_match_all('/([^' . $non_word . ']{' . $minChar . ',})/msu', $str, $match)) { foreach ($match[1] as $i => $v) { $match[1][$i] = mb_strtolower($v); } return $match[1]; } - return array(); + return []; } /** -- 2.39.5