mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +00:00
Remove some Throwable abuse in AsyncTasks
This commit is contained in:
parent
3e5237b6e0
commit
046c39b02e
@ -44,10 +44,6 @@ class FileWriteTask extends AsyncTask{
|
||||
}
|
||||
|
||||
public function onRun(){
|
||||
try{
|
||||
file_put_contents($this->path, $this->contents, $this->flags);
|
||||
}catch(\Throwable $e){
|
||||
|
||||
}
|
||||
file_put_contents($this->path, $this->contents, $this->flags);
|
||||
}
|
||||
}
|
||||
|
@ -147,13 +147,9 @@ class SendUsageTask extends AsyncTask{
|
||||
}
|
||||
|
||||
public function onRun(){
|
||||
try{
|
||||
Internet::postURL($this->endpoint, $this->data, 5, [
|
||||
"Content-Type: application/json",
|
||||
"Content-Length: " . strlen($this->data)
|
||||
]);
|
||||
}catch(\Throwable $e){
|
||||
|
||||
}
|
||||
Internet::postURL($this->endpoint, $this->data, 5, [
|
||||
"Content-Type: application/json",
|
||||
"Content-Length: " . strlen($this->data)
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user