mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-23 11:26:37 +00:00
bootstrap: avoid making COMPOSER_AUTOLOADER_PATH having a possible false type
This commit is contained in:
parent
34a3e0d8b1
commit
e6f64c609e
@ -177,15 +177,14 @@ namespace pocketmine {
|
|||||||
}else{
|
}else{
|
||||||
$bootstrap = dirname(__FILE__, 3) . '/vendor/autoload.php';
|
$bootstrap = dirname(__FILE__, 3) . '/vendor/autoload.php';
|
||||||
}
|
}
|
||||||
define('pocketmine\COMPOSER_AUTOLOADER_PATH', $bootstrap);
|
|
||||||
|
|
||||||
if(\pocketmine\COMPOSER_AUTOLOADER_PATH !== false and is_file(\pocketmine\COMPOSER_AUTOLOADER_PATH)){
|
if($bootstrap === false or !is_file($bootstrap)){
|
||||||
require_once(\pocketmine\COMPOSER_AUTOLOADER_PATH);
|
|
||||||
}else{
|
|
||||||
critical_error("Composer autoloader not found at " . $bootstrap);
|
critical_error("Composer autoloader not found at " . $bootstrap);
|
||||||
critical_error("Please install/update Composer dependencies or use provided builds.");
|
critical_error("Please install/update Composer dependencies or use provided builds.");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
define('pocketmine\COMPOSER_AUTOLOADER_PATH', $bootstrap);
|
||||||
|
require_once(\pocketmine\COMPOSER_AUTOLOADER_PATH);
|
||||||
|
|
||||||
set_error_handler([Utils::class, 'errorExceptionHandler']);
|
set_error_handler([Utils::class, 'errorExceptionHandler']);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user