]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use the null coalescing operator to set the value of `size`. 31632/head
authorMax Kunzelmann <maxdev@posteo.de>
Mon, 28 Mar 2022 20:22:36 +0000 (22:22 +0200)
committerMax Kunzelmann <maxdev@posteo.de>
Mon, 28 Mar 2022 20:26:45 +0000 (22:26 +0200)
Signed-off-by: Max Kunzelmann <maxdev@posteo.de>
lib/private/Files/Storage/DAV.php

index 568262d981714ffc9ec1dfc9bcb77d31ca3fe3c6..ee874d97b55f3a0f7b07424d98cba1a067fc58ed 100644 (file)
@@ -588,7 +588,7 @@ class DAV extends Common {
                        }
                        return [
                                'mtime' => isset($response['{DAV:}getlastmodified']) ? strtotime($response['{DAV:}getlastmodified']) : null,
-                               'size' => (int)isset($response['{DAV:}getcontentlength']) ? $response['{DAV:}getcontentlength'] : 0,
+                               'size' => (int)($response['{DAV:}getcontentlength'] ?? 0),
                        ];
                } catch (\Exception $e) {
                        $this->convertException($e, $path);