Added reference parameters for errors for Utils::getURL() and Utils::postURL(), close #332 (#357)

This commit is contained in:
Dylan K. Taylor
2017-03-16 19:15:31 +00:00
committed by GitHub
parent 548df21645
commit bcbb5de5bb
2 changed files with 20 additions and 8 deletions

View File

@ -57,7 +57,13 @@ class AutoUpdater{
}
protected function check(){
$response = Utils::getURL($this->endpoint . "?channel=" . $this->getChannel(), 4);
$error = "";
$response = Utils::getURL($this->endpoint . "?channel=" . $this->getChannel(), 4, [], $error);
if($error !== ""){
$this->server->getLogger()->debug("[AutoUpdater] Update check failed due to \"$error\"");
return;
}
$response = json_decode($response, true);
if(!is_array($response)){
return;