Skip to content

Commit

Permalink
Use the null coalescing operator to set the value of size.
Browse files Browse the repository at this point in the history
Signed-off-by: Max Kunzelmann <maxdev@posteo.de>
  • Loading branch information
Maaxxs committed Mar 28, 2022
1 parent 3a135f0 commit 2952c7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/Files/Storage/DAV.php
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ public function stat($path) {
}
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);
Expand Down

0 comments on commit 2952c7d

Please sign in to comment.