From 0456f61c1cab907cbd582cfbf3e942460933f537 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 22 Mar 2022 10:24:51 +0100 Subject: Fix passing null to strlen $filter can be null as it's the default value passed in ContactsMenuController. On PHP 8.1 : strlen(): Passing null to parameter #1 ($string) of type string is deprecated Signed-off-by: Thomas Citharel --- lib/private/Contacts/ContactsMenu/ContactsStore.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/private/Contacts/ContactsMenu/ContactsStore.php') diff --git a/lib/private/Contacts/ContactsMenu/ContactsStore.php b/lib/private/Contacts/ContactsMenu/ContactsStore.php index 5b7a942a244..0ac388ce00a 100644 --- a/lib/private/Contacts/ContactsMenu/ContactsStore.php +++ b/lib/private/Contacts/ContactsMenu/ContactsStore.php @@ -107,7 +107,7 @@ class ContactsStore implements IContactsStore { } $allContacts = $this->contactsManager->search( - $filter ?: '', + $filter ?? '', [ 'FN', 'EMAIL' @@ -146,7 +146,7 @@ class ContactsStore implements IContactsStore { * * @param IUser $self * @param Entry[] $entries - * @param string $filter + * @param string|null $filter * @return Entry[] the filtered contacts */ private function filterContacts( -- cgit v1.2.3