Added a check for Phar extension

This commit is contained in:
Dylan K. Taylor 2017-05-26 21:39:43 +01:00
parent 4c764072b2
commit 645d744e05

View File

@ -84,6 +84,12 @@ namespace pocketmine {
* Enjoy it as much as I did writing it. I don't want to do it again.
*/
if(!extension_loaded("phar")){
echo "[CRITICAL] Unable to find the Phar extension." . PHP_EOL;
echo "[CRITICAL] Please use the installer provided on the homepage." . PHP_EOL;
exit(1);
}
if(\Phar::running(true) !== ""){
@define('pocketmine\PATH', \Phar::running(true) . "/");
}else{