aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib')
-rw-r--r--apps/dav/lib/Avatars/AvatarHome.php4
-rw-r--r--apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php4
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/dav/lib/Avatars/AvatarHome.php b/apps/dav/lib/Avatars/AvatarHome.php
index ba52daeb2b3..097307f452f 100644
--- a/apps/dav/lib/Avatars/AvatarHome.php
+++ b/apps/dav/lib/Avatars/AvatarHome.php
@@ -59,8 +59,8 @@ class AvatarHome implements ICollection {
public function getChild($name) {
$elements = pathinfo($name);
- $ext = isset($elements['extension']) ? $elements['extension'] : '';
- $size = (int)(isset($elements['filename']) ? $elements['filename'] : '64');
+ $ext = $elements['extension'] ?? '';
+ $size = (int)($elements['filename'] ?? '64');
if (!in_array($ext, ['jpeg', 'png'], true)) {
throw new MethodNotAllowed('File format not allowed');
}
diff --git a/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php b/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php
index eb5d7d4661d..6a97cd30d9f 100644
--- a/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php
+++ b/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php
@@ -62,8 +62,8 @@ class ShareRequest implements XmlDeserializable {
$set[] = [
'href' => $sharee['{DAV:}href'],
- 'commonName' => isset($sharee[$commonName]) ? $sharee[$commonName] : null,
- 'summary' => isset($sharee[$sumElem]) ? $sharee[$sumElem] : null,
+ 'commonName' => $sharee[$commonName] ?? null,
+ 'summary' => $sharee[$sumElem] ?? null,
'readOnly' => !array_key_exists('{' . Plugin::NS_OWNCLOUD . '}read-write', $sharee),
];
break;