mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
PHP version should be the very first thing to be checked
This commit is contained in:
parent
c70690a600
commit
8bf1cc9e48
@ -89,6 +89,18 @@ namespace pocketmine {
|
||||
* Enjoy it as much as I did writing it. I don't want to do it again.
|
||||
*/
|
||||
|
||||
if(version_compare("7.0", PHP_VERSION) > 0){
|
||||
echo "[CRITICAL] You must use PHP >= 7.0" . PHP_EOL;
|
||||
echo "[CRITICAL] Please use the installer provided on the homepage." . PHP_EOL;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if(!extension_loaded("pthreads")){
|
||||
echo "[CRITICAL] Unable to find the pthreads extension." . PHP_EOL;
|
||||
echo "[CRITICAL] Please use the installer provided on the homepage." . PHP_EOL;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
error_reporting(-1);
|
||||
|
||||
set_error_handler(function($severity, $message, $file, $line){
|
||||
@ -111,18 +123,6 @@ namespace pocketmine {
|
||||
define('pocketmine\PATH', realpath(getcwd()) . DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
if(version_compare("7.0", PHP_VERSION) > 0){
|
||||
echo "[CRITICAL] You must use PHP >= 7.0" . PHP_EOL;
|
||||
echo "[CRITICAL] Please use the installer provided on the homepage." . PHP_EOL;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if(!extension_loaded("pthreads")){
|
||||
echo "[CRITICAL] Unable to find the pthreads extension." . PHP_EOL;
|
||||
echo "[CRITICAL] Please use the installer provided on the homepage." . PHP_EOL;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if(!class_exists("ClassLoader", false)){
|
||||
if(!is_file(\pocketmine\PATH . "src/spl/ClassLoader.php")){
|
||||
echo "[CRITICAL] Unable to find the PocketMine-SPL library." . PHP_EOL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user