Skip to content

Commit 7664475

Browse files
committed
fix(dav): avoid TypeError on public DAV HEAD range
Signed-off-by: hgrobbel <[email protected]>
1 parent 086aa07 commit 7664475

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

sabre/dav/lib/DAV/CorePlugin.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ public function httpGet(RequestInterface $request, ResponseInterface $response)
8383
$body = '';
8484
} else {
8585
$body = $node->get();
86-
87-
// Converting string into stream, if needed.
88-
if (is_string($body)) {
89-
$stream = fopen('php://temp', 'r+');
90-
fwrite($stream, $body);
91-
rewind($stream);
92-
$body = $stream;
93-
}
9486
}
87+
// Converting string into stream, if needed.
88+
if (is_string($body)) {
89+
$stream = fopen('php://temp', 'r+');
90+
fwrite($stream, $body);
91+
rewind($stream);
92+
$body = $stream;
93+
}
94+
9595

9696
/*
9797
* TODO: getetag, getlastmodified, getsize should also be used using

0 commit comments

Comments
 (0)