From d66614205cedbca85f52757bbb1e1ee576d85261 Mon Sep 17 00:00:00 2001
From: "florian.azizian" <florian.azizian@maarch.org>
Date: Fri, 30 Oct 2020 22:56:51 +0100
Subject: [PATCH] FIX #14925 TIME 0:05 improve controle on BAN autocomplete

---
 src/core/controllers/AutoCompleteController.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/core/controllers/AutoCompleteController.php b/src/core/controllers/AutoCompleteController.php
index ce1f2fc2d84..ca96fe39e04 100755
--- a/src/core/controllers/AutoCompleteController.php
+++ b/src/core/controllers/AutoCompleteController.php
@@ -644,11 +644,11 @@ class AutoCompleteController
         $data['address'] = str_replace(['*', '~', '-', '\''], ' ', $data['address']);
         $aAddress = explode(' ', $data['address']);
         foreach ($aAddress as $key => $value) {
-            if (strlen($value) <= 2 && !is_numeric($value)) {
+            if (mb_strlen($value) <= 2 && !is_numeric($value)) {
                 unset($aAddress[$key]);
                 continue;
             }
-            if (strlen($value) >= 3 && $value != 'rue' && $value != 'avenue' && $value != 'boulevard') {
+            if (mb_strlen($value) >= 3 && $value != 'rue' && $value != 'avenue' && $value != 'boulevard') {
                 $aAddress[$key] .= '*';
             }
         }
-- 
GitLab