prevent warning in StreamResponse
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
8d81b9e6eb
commit
72a54ff9de
|
@ -54,7 +54,7 @@ class StreamResponse extends Response implements ICallbackResponse {
|
||||||
public function callback (IOutput $output) {
|
public function callback (IOutput $output) {
|
||||||
// handle caching
|
// handle caching
|
||||||
if ($output->getHttpResponseCode() !== Http::STATUS_NOT_MODIFIED) {
|
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);
|
$output->setHttpResponseCode(Http::STATUS_NOT_FOUND);
|
||||||
} elseif ($output->setReadfile($this->filePath) === false) {
|
} elseif ($output->setReadfile($this->filePath) === false) {
|
||||||
$output->setHttpResponseCode(Http::STATUS_BAD_REQUEST);
|
$output->setHttpResponseCode(Http::STATUS_BAD_REQUEST);
|
||||||
|
|
Loading…
Reference in New Issue