diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-14 16:10:40 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-14 16:10:40 +0100 |
commit | d21928496171fb167a8d11610e4c107deccbb5f5 (patch) | |
tree | 86fe30caa4fab9fb0ee4bb8dd872036b73bb7de0 /lib | |
parent | 0b6eaa863da89ccb1865b92e52fc4e8b851dc2ef (diff) | |
parent | d43051f7def4da8e8e1213c24bb52a9992ec5ce5 (diff) | |
download | nextcloud-server-d21928496171fb167a8d11610e4c107deccbb5f5.tar.gz nextcloud-server-d21928496171fb167a8d11610e4c107deccbb5f5.zip |
Merge pull request #23191 from owncloud/fix-external-dav-storage
Verify the getResponse returns a ResponseInterface
Diffstat (limited to 'lib')
-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; |