close #403 Fixed: System not working if no internet connection
This commit is contained in:
parent
a6492033da
commit
64aa12a997
@ -373,8 +373,13 @@ trait Modules
|
|||||||
|
|
||||||
$response = $this->getRemote($url, 'GET', ['timeout' => 30, 'referer' => true]);
|
$response = $this->getRemote($url, 'GET', ['timeout' => 30, 'referer' => true]);
|
||||||
|
|
||||||
|
// Exception
|
||||||
|
if ($response instanceof RequestException) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Bad response
|
// Bad response
|
||||||
if ($response->getStatusCode() != 200) {
|
if (!$response || ($response->getStatusCode() != 200)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ class Updater
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($response->getStatusCode() == 200) {
|
if ($response && ($response->getStatusCode() == 200)) {
|
||||||
$file = $response->getBody()->getContents();
|
$file = $response->getBody()->getContents();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ class Versions
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Bad response
|
// Bad response
|
||||||
if ($response->getStatusCode() != 200) {
|
if (!$response || ($response->getStatusCode() != 200)) {
|
||||||
return $latest;
|
return $latest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user