diff --git a/Grid/Source/Source.php b/Grid/Source/Source.php index f2605216..8d685548 100644 --- a/Grid/Source/Source.php +++ b/Grid/Source/Source.php @@ -576,6 +576,9 @@ protected function prepareStringForLikeCompare($input, $type = null) private function removeAccents($str) { + if (!is_string($str)) { + return $str; // Retourne l'entrée telle quelle si ce n'est pas une chaîne + } $entStr = htmlentities($str, ENT_NOQUOTES, 'UTF-8'); $noaccentStr = preg_replace('#&([A-za-z])(?:acute|cedil|circ|grave|orn|ring|slash|th|tilde|uml);#', '\1', $entStr);