From 4e620a4be77018cf2945b79c3c1c120c78b25b3c Mon Sep 17 00:00:00 2001 From: artembaharev Date: Tue, 3 Jul 2018 12:02:13 +0500 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BE=D0=BF=D0=B5=D1=87=D0=B0=D1=82=D0=BA?= =?UTF-8?q?=D0=B0.=20mb=5Fstrlen=20->=20mb=5Fsubstr?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/model/shopSearchWord.model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/model/shopSearchWord.model.php b/lib/model/shopSearchWord.model.php index 8d9743a96..216316c89 100644 --- a/lib/model/shopSearchWord.model.php +++ b/lib/model/shopSearchWord.model.php @@ -15,7 +15,7 @@ public function getId($word) return self::$words_cache[$word]; } if (mb_strlen($word) > 255) { - $word = mb_strlen($word, 0, 255); + $word = mb_substr($word, 0, 255); } $sql = "SELECT * FROM ".$this->table." WHERE name LIKE '".$this->escape($word, 'like')."'"; $row = $this->query($sql)->fetch(); @@ -50,4 +50,4 @@ public function getIds($words, $by_part = 0) return array(); } -} \ No newline at end of file +}