mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-04 08:56:15 +00:00
Cleaned up MainLogger registration and declared a typehint
Remove null hint from MainLogger::getLogger() so static analysis doesn't complain everywhere just make sure you register the logger before trying to use MainLogger::getLogger() on a different thread!
This commit is contained in:
@ -38,9 +38,7 @@ class AsyncWorker extends Worker{
|
||||
|
||||
public function run(){
|
||||
$this->registerClassLoader();
|
||||
if(MainLogger::getLogger() === null){
|
||||
$this->logger->registerStatic();
|
||||
}
|
||||
$this->logger->registerStatic();
|
||||
|
||||
gc_enable();
|
||||
ini_set("memory_limit", '-1');
|
||||
|
Reference in New Issue
Block a user