]> source.dussan.org Git - nextcloud-server.git/commitdiff
prevent warning in StreamResponse 2404/head
authorRobin Appelman <robin@icewind.nl>
Tue, 29 Nov 2016 14:29:02 +0000 (15:29 +0100)
committerRobin Appelman <robin@icewind.nl>
Tue, 29 Nov 2016 14:29:02 +0000 (15:29 +0100)
Signed-off-by: Robin Appelman <robin@icewind.nl>
lib/public/AppFramework/Http/StreamResponse.php

index e124bb4ccbf87b8af1ecfeb9aa30514c7af6bbb2..b3ec5577e292bf80a3b13f01bf5f2d3638a6b3fa 100644 (file)
@@ -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);