PocketMine.php: move stuff out of do{}while(false) that doesn't need to be in there

This commit is contained in:
Dylan K. Taylor 2018-02-06 19:13:57 +00:00
parent ca9f700fb0
commit bad323f5cc

View File

@ -334,13 +334,14 @@ namespace pocketmine {
return str_replace(["\\", ".php", "phar://", str_replace(["\\", "phar://"], ["/", ""], \pocketmine\PATH), str_replace(["\\", "phar://"], ["/", ""], \pocketmine\PLUGIN_PATH)], ["/", "", "", "", ""], $path); return str_replace(["\\", ".php", "phar://", str_replace(["\\", "phar://"], ["/", ""], \pocketmine\PATH), str_replace(["\\", "phar://"], ["/", ""], \pocketmine\PLUGIN_PATH)], ["/", "", "", "", ""], $path);
} }
$exitCode = 0;
do{
if(extension_loaded("xdebug")){ if(extension_loaded("xdebug")){
$logger->warning(PHP_EOL . PHP_EOL . PHP_EOL . "\tYou are running " . \pocketmine\NAME . " with xdebug enabled. This has a major impact on performance." . PHP_EOL . PHP_EOL); $logger->warning(PHP_EOL . PHP_EOL . PHP_EOL . "\tYou are running " . \pocketmine\NAME . " with xdebug enabled. This has a major impact on performance." . PHP_EOL . PHP_EOL);
} }
if(\Phar::running(true) === ""){
$logger->warning("Non-packaged " . \pocketmine\NAME . " installation detected. Consider using a phar in production for better performance.");
}
$gitHash = str_repeat("00", 20); $gitHash = str_repeat("00", 20);
if(\Phar::running(true) === ""){ if(\Phar::running(true) === ""){
@ -364,7 +365,8 @@ namespace pocketmine {
@define("INT32_MASK", is_int(0xffffffff) ? 0xffffffff : -1); @define("INT32_MASK", is_int(0xffffffff) ? 0xffffffff : -1);
@ini_set("opcache.mmap_base", bin2hex(random_bytes(8))); //Fix OPCache address errors @ini_set("opcache.mmap_base", bin2hex(random_bytes(8))); //Fix OPCache address errors
$exitCode = 0;
do{
if(!file_exists(\pocketmine\DATA . "server.properties") and !isset($opts["no-wizard"])){ if(!file_exists(\pocketmine\DATA . "server.properties") and !isset($opts["no-wizard"])){
$installer = new SetupWizard(); $installer = new SetupWizard();
if(!$installer->run()){ if(!$installer->run()){
@ -373,11 +375,6 @@ namespace pocketmine {
} }
} }
if(\Phar::running(true) === ""){
$logger->warning("Non-packaged " . \pocketmine\NAME . " installation detected. Consider using a phar in production for better performance.");
}
ThreadManager::init(); ThreadManager::init();
new Server($autoloader, $logger, \pocketmine\DATA, \pocketmine\PLUGIN_PATH); new Server($autoloader, $logger, \pocketmine\DATA, \pocketmine\PLUGIN_PATH);