🚑 put back call_user_func
This commit is contained in:
parent
1dfcb4a4d5
commit
c432e9a4f9
@ -51,9 +51,9 @@ class Bot
|
||||
$preg_pattern = sprintf('#%s#i', $pattern);
|
||||
if (preg_match($preg_pattern, $sentence, $matches)) {
|
||||
if (is_callable($command)) {
|
||||
$command($this);
|
||||
call_user_func($command, $this);
|
||||
} else {
|
||||
$command->getMessage($this, $matches);
|
||||
call_user_func([$command, 'getMessage'], $this, $matches);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user