diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-15 14:09:55 +0300 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-15 14:09:55 +0300 |
commit | 6f64c99653d86dc2fdc6624818d1bd0d4934ec54 (patch) | |
tree | 0c6af3f4463f7dc9830d3cf80b1607c4f8c82f93 | |
parent | ce0f28c123a441d114e12cc285bd2a377b6d7283 (diff) | |
parent | 3a73f977067d328dc77b6f69519801169d9cf657 (diff) |
Merge pull request #23230 from owncloud/backport-23191
[stable9] Verify the getResponse returns a ResponseInterface
-rw-r--r-- | lib/private/files/storage/dav.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/files/storage/dav.php b/lib/private/files/storage/dav.php index 495419fa865..df0f4c7e91d 100644 --- a/lib/private/files/storage/dav.php +++ b/lib/private/files/storage/dav.php @@ -34,6 +34,7 @@ namespace OC\Files\Storage; use Exception; use GuzzleHttp\Exception\RequestException; +use GuzzleHttp\Message\ResponseInterface; use OC\Files\Filesystem; use OC\Files\Stream\Close; use Icewind\Streams\IteratorDirectory; @@ -351,7 +352,8 @@ class DAV extends Common { 'stream' => true ]); } catch (RequestException $e) { - if ($e->getResponse()->getStatusCode() === 404) { + if ($e->getResponse() instanceof ResponseInterface + && $e->getResponse()->getStatusCode() === 404) { return false; } else { throw $e; |