Merge pull request #23191 from owncloud/fix-external-dav-storage
Verify the getResponse returns a ResponseInterface
This commit is contained in:
commit
d219284961
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue