Skip to content

Commit

Permalink
Fix deprecated
Browse files Browse the repository at this point in the history
fix : Deprecated: htmlentities(): Passing null to parameter #1 ($string) of type string is deprecated
  • Loading branch information
npotier authored Dec 6, 2024
1 parent c9c8a20 commit 66ffc7f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Grid/Source/Source.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 66ffc7f

Please sign in to comment.