mirror of
https://github.com/nextcloud/server.git
synced 2026-07-15 21:03:00 -04:00
Merge pull request #2404 from nextcloud/streamresponse-warning
prevent warning in StreamResponse
This commit is contained in:
commit
e86ea95043
1 changed files with 1 additions and 1 deletions
|
|
@ -54,7 +54,7 @@ class StreamResponse extends Response implements ICallbackResponse {
|
|||
public function callback (IOutput $output) {
|
||||
// handle caching
|
||||
if ($output->getHttpResponseCode() !== Http::STATUS_NOT_MODIFIED) {
|
||||
if (!(file_exists($this->filePath) || is_resource($this->filePath))) {
|
||||
if (!(is_resource($this->filePath) || file_exists($this->filePath))) {
|
||||
$output->setHttpResponseCode(Http::STATUS_NOT_FOUND);
|
||||
} elseif ($output->setReadfile($this->filePath) === false) {
|
||||
$output->setHttpResponseCode(Http::STATUS_BAD_REQUEST);
|
||||
|
|
|
|||
Loading…
Reference in a new issue