From 09bcb7c41b70fc4fc677aaf79f75389f095fe151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20=C5=A0mahel?= Date: Wed, 6 Mar 2019 11:13:27 +0100 Subject: [PATCH] FIX: Bad characters in extract due to preg_replace with php 7.0 and lower --- .../simplesearch/model/simplesearch/simplesearch.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/components/simplesearch/model/simplesearch/simplesearch.class.php b/core/components/simplesearch/model/simplesearch/simplesearch.class.php index 8577f54..5a2cc08 100644 --- a/core/components/simplesearch/model/simplesearch/simplesearch.class.php +++ b/core/components/simplesearch/model/simplesearch/simplesearch.class.php @@ -344,7 +344,7 @@ public function sanitize($text) { * @return string The generated extract. */ public function createExtract($text, $length = 200, $search = '', $ellipsis = '...') { - $text = trim(preg_replace('/\s+/', ' ', $this->sanitize($text))); + $text = trim(preg_replace('/\s+/u', ' ', $this->sanitize($text))); if (empty($text)) { return ''; }