Get correct Phar path if not specified

This commit is contained in:
Shoghi Cervantes 2014-04-04 02:53:41 +02:00
parent 0f0b866788
commit 648b23d08f

View File

@ -87,7 +87,11 @@ namespace pocketmine {
const MINECRAFT_VERSION = "v0.8.1 alpha";
const PHP_VERSION = "5.5";
@define("pocketmine\\PATH", \getcwd() . DIRECTORY_SEPARATOR);
if(\Phar::running(true) !== ""){
@define("pocketmine\\PATH", \Phar::running(true)."/");
}else{
@define("pocketmine\\PATH", \getcwd() . DIRECTORY_SEPARATOR);
}
if(!class_exists("SplClassLoader", false)){
require_once(\pocketmine\PATH . "src/spl/SplClassLoader.php");