mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Fixed object callable PHP 5.3
This commit is contained in:
parent
cae6285f64
commit
5042289ff7
2 changed files with 16 additions and 4 deletions
|
|
@ -221,7 +221,10 @@ class ConsoleAPI{
|
|||
}
|
||||
}
|
||||
|
||||
public function register($cmd, $help,callable $callback){
|
||||
public function register($cmd, $help,$callback){
|
||||
if(!is_callable($callback)){
|
||||
return false;
|
||||
}
|
||||
$this->help[strtolower(trim($cmd))] = array($help, $callback);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue