summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/files_external/lib/google.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php
index 982fa6bb48f..3e8b60d33df 100644
--- a/apps/files_external/lib/google.php
+++ b/apps/files_external/lib/google.php
@@ -446,8 +446,12 @@ class Google extends \OC\Files\Storage\Common {
'save_to' => $tmpFile,
]);
} catch (RequestException $e) {
- if ($e->getResponse()->getStatusCode() === 404) {
- return false;
+ if(!is_null($e->getResponse())) {
+ if ($e->getResponse()->getStatusCode() === 404) {
+ return false;
+ } else {
+ throw $e;
+ }
} else {
throw $e;
}