aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Contacts/ContactsMenu/ContactsStore.php
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2022-03-22 10:24:51 +0100
committerCôme Chilliet (Rebase PR Action) <come-nc@users.noreply.github.com>2022-03-24 09:56:44 +0000
commit0456f61c1cab907cbd582cfbf3e942460933f537 (patch)
tree2796e35ab533fe2b0c80ad2c90315d6c1de6ad1b /lib/private/Contacts/ContactsMenu/ContactsStore.php
parentc9ea2363b1e50748b7c85f1e14b036c3d92cc31a (diff)
downloadnextcloud-server-0456f61c1cab907cbd582cfbf3e942460933f537.tar.gz
nextcloud-server-0456f61c1cab907cbd582cfbf3e942460933f537.zip
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 <tcit@tcit.fr>
Diffstat (limited to 'lib/private/Contacts/ContactsMenu/ContactsStore.php')
-rw-r--r--lib/private/Contacts/ContactsMenu/ContactsStore.php4
1 files changed, 2 insertions, 2 deletions
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(