From 4a643bbc4cdb7e8f7ef9421c22cb1d320defec3c Mon Sep 17 00:00:00 2001 From: Keenan Yafiq Date: Sun, 10 Dec 2023 20:12:08 +0700 Subject: [PATCH] fix bug that makes servers unable to start because of no internet (#28) useless fix but it's pretty much good enough for testing servers --------- Co-authored-by: poggit-bot --- src/Matthww/PlayerInfo/Tasks/FetchModelsTask.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Matthww/PlayerInfo/Tasks/FetchModelsTask.php b/src/Matthww/PlayerInfo/Tasks/FetchModelsTask.php index f3b562d..7b6c663 100644 --- a/src/Matthww/PlayerInfo/Tasks/FetchModelsTask.php +++ b/src/Matthww/PlayerInfo/Tasks/FetchModelsTask.php @@ -15,13 +15,13 @@ class FetchModelsTask extends AsyncTask { } public function onRun(): void { - $result = Internet::getURL("https://raw.githubusercontent.com/Matthww/PlayerInfo/master/resources/models.yml")->getBody(); - if(!is_string($result)) { + $result = Internet::getURL("https://raw.githubusercontent.com/Matthww/PlayerInfo/master/resources/models.yml"); + if(is_null($result)) { $this->setResult(false); return; } - file_put_contents($this->path. "models.yml", $result); + file_put_contents($this->path. "models.yml", $result->getBody()); $this->setResult(true); } }