]> git.agnieray.net Git - galette.git/commitdiff
Fix "passing null is deprecated"
authorJohan Cwiklinski <johan@x-tnd.be>
Wed, 10 Apr 2024 12:12:12 +0000 (14:12 +0200)
committerJohan Cwiklinski <johan@x-tnd.be>
Wed, 10 Apr 2024 12:12:12 +0000 (14:12 +0200)
galette/lib/Galette/Util/Password.php

index 16718c56c7372cf1696870f766c709aca980c348..b7fabe6863a38dbdeae131d5600466b71d88ba69 100644 (file)
@@ -226,7 +226,15 @@ class Password
     {
         $this->personal_infos = array_merge(
             $this->personal_infos,
-            array_map('mb_strtolower', array_values($infos))
+            array_map(
+                function ($info) {
+                    if ($info !== null) {
+                        return mb_strtolower($info);
+                    }
+                    return $info;
+                },
+                array_values($infos)
+            )
         );
         return $this->personal_infos;
     }