]> source.dussan.org Git - nextcloud-server.git/commitdiff
More error handling
authorLukas Reschke <lukas@owncloud.com>
Thu, 25 Feb 2016 09:12:31 +0000 (10:12 +0100)
committerLukas Reschke <lukas@owncloud.com>
Thu, 25 Feb 2016 09:12:31 +0000 (10:12 +0100)
apps/files_external/lib/google.php

index 982fa6bb48f1a71e538ea5ce4a6d291c815dc9a7..3e8b60d33df7448708384099dcbf1f5f3e7d513e 100644 (file)
@@ -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;
                                                        }