aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Contacts/ContactsMenu/ContactsStore.php
diff options
context:
space:
mode:
authorFaraz Samapoor <fsamapoor@gmail.com>2023-05-15 15:17:19 +0330
committerFaraz Samapoor <fsamapoor@gmail.com>2023-05-15 15:17:19 +0330
commite7cc7653b885c49b1b3f0a78f91ea05a53e102d8 (patch)
tree42da61d5c6e988d7c9eff7e081327a73f661dc89 /lib/private/Contacts/ContactsMenu/ContactsStore.php
parent8bdb50fd507bfe68161ab98eba903872083ea4f3 (diff)
downloadnextcloud-server-e7cc7653b885c49b1b3f0a78f91ea05a53e102d8.tar.gz
nextcloud-server-e7cc7653b885c49b1b3f0a78f91ea05a53e102d8.zip
Refactors "strpos" calls in lib/private to improve code readability.
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
Diffstat (limited to 'lib/private/Contacts/ContactsMenu/ContactsStore.php')
-rw-r--r--lib/private/Contacts/ContactsMenu/ContactsStore.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Contacts/ContactsMenu/ContactsStore.php b/lib/private/Contacts/ContactsMenu/ContactsStore.php
index 3a75e924d24..e4dd80645ea 100644
--- a/lib/private/Contacts/ContactsMenu/ContactsStore.php
+++ b/lib/private/Contacts/ContactsMenu/ContactsStore.php
@@ -302,7 +302,7 @@ class ContactsStore implements IContactsStore {
}
$avatarPrefix = "VALUE=uri:";
- if (isset($contact['PHOTO']) && strpos($contact['PHOTO'], $avatarPrefix) === 0) {
+ if (isset($contact['PHOTO']) && str_starts_with($contact['PHOTO'], $avatarPrefix)) {
$entry->setAvatar(substr($contact['PHOTO'], strlen($avatarPrefix)));
}