Use the null coalescing operator to set the value of size.

Signed-off-by: Max Kunzelmann <maxdev@posteo.de>
This commit is contained in:
Max Kunzelmann 2022-03-28 22:22:36 +02:00
parent 3a135f0c5f
commit 2952c7d01f

View 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);