Skip to content

Commit

Permalink
More error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasReschke committed Feb 25, 2016
1 parent 3b5ddb4 commit aebb900
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions apps/files_external/lib/google.php
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,12 @@ public function fopen($path, $mode) {
'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;
}
Expand Down

0 comments on commit aebb900

Please sign in to comment.