Commit bcd1b4d9 authored by Frago9876543210's avatar Frago9876543210 Committed by GitHub
Browse files

Merge pull request #874 from AppleDevelops/master

Update to PHP7.2
parents 029e581d a0e596f4
...@@ -94,8 +94,8 @@ namespace pocketmine { ...@@ -94,8 +94,8 @@ namespace pocketmine {
@define('pocketmine\PATH', \getcwd() . DIRECTORY_SEPARATOR); @define('pocketmine\PATH', \getcwd() . DIRECTORY_SEPARATOR);
} }
if(version_compare("7.0", PHP_VERSION) > 0){ if(version_compare("7.2", PHP_VERSION) > 0){
echo "[CRITICAL] You must use PHP >= 7.0" . PHP_EOL; echo "[CRITICAL] You must use PHP >= 7.2" . PHP_EOL;
echo "[CRITICAL] Please use the installer provided on the homepage." . PHP_EOL; echo "[CRITICAL] Please use the installer provided on the homepage." . PHP_EOL;
exit(1); exit(1);
} }
......
...@@ -71,7 +71,7 @@ abstract class Thread extends \Thread { ...@@ -71,7 +71,7 @@ abstract class Thread extends \Thread {
* *
* @return bool * @return bool
*/ */
public function start(int $options = PTHREADS_INHERIT_ALL){ public function start(?int $options = \PTHREADS_INHERIT_ALL){
ThreadManager::getInstance()->add($this); ThreadManager::getInstance()->add($this);
if(!$this->isRunning() and !$this->isJoined() and !$this->isTerminated()){ if(!$this->isRunning() and !$this->isJoined() and !$this->isTerminated()){
......
...@@ -72,7 +72,7 @@ abstract class Worker extends \Worker { ...@@ -72,7 +72,7 @@ abstract class Worker extends \Worker {
* *
* @return bool * @return bool
*/ */
public function start(int $options = PTHREADS_INHERIT_ALL){ public function start(?int $options = \PTHREADS_INHERIT_ALL){
ThreadManager::getInstance()->add($this); ThreadManager::getInstance()->add($this);
if(!$this->isRunning() and !$this->isJoined() and !$this->isTerminated()){ if(!$this->isRunning() and !$this->isJoined() and !$this->isTerminated()){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment