Fixed reference parameter fail in UpdateCheckTask, close #1048

not sure _why_ this doesn't work... maybe something to do with the old property being a member of a threaded object?
This commit is contained in:
Dylan K. Taylor 2017-06-09 19:51:18 +01:00
parent c43ab12a9a
commit 1aae9e03b6

View File

@ -36,7 +36,7 @@ class UpdateCheckTask extends AsyncTask{
/** @var string */ /** @var string */
private $channel; private $channel;
/** @var string */ /** @var string */
private $error; private $error = "Unknown error";
public function __construct(string $endpoint, string $channel){ public function __construct(string $endpoint, string $channel){
$this->endpoint = $endpoint; $this->endpoint = $endpoint;
@ -44,11 +44,11 @@ class UpdateCheckTask extends AsyncTask{
} }
public function onRun(){ public function onRun(){
$this->error = ""; $error = "";
$response = Utils::getURL($this->endpoint . "?channel=" . $this->channel, 4, [], $this->error); $response = Utils::getURL($this->endpoint . "?channel=" . $this->channel, 4, [], $error);
if($this->error !== ""){ $this->error = $error;
return;
}else{ if($response !== false){
$response = json_decode($response, true); $response = json_decode($response, true);
if(is_array($response)){ if(is_array($response)){
$this->setResult( $this->setResult(