mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 16:24:05 +00:00
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:
parent
c43ab12a9a
commit
1aae9e03b6
@ -36,7 +36,7 @@ class UpdateCheckTask extends AsyncTask{
|
||||
/** @var string */
|
||||
private $channel;
|
||||
/** @var string */
|
||||
private $error;
|
||||
private $error = "Unknown error";
|
||||
|
||||
public function __construct(string $endpoint, string $channel){
|
||||
$this->endpoint = $endpoint;
|
||||
@ -44,11 +44,11 @@ class UpdateCheckTask extends AsyncTask{
|
||||
}
|
||||
|
||||
public function onRun(){
|
||||
$this->error = "";
|
||||
$response = Utils::getURL($this->endpoint . "?channel=" . $this->channel, 4, [], $this->error);
|
||||
if($this->error !== ""){
|
||||
return;
|
||||
}else{
|
||||
$error = "";
|
||||
$response = Utils::getURL($this->endpoint . "?channel=" . $this->channel, 4, [], $error);
|
||||
$this->error = $error;
|
||||
|
||||
if($response !== false){
|
||||
$response = json_decode($response, true);
|
||||
if(is_array($response)){
|
||||
$this->setResult(
|
||||
|
Loading…
x
Reference in New Issue
Block a user