🚑 put back call_user_func

This commit is contained in:
Clement Desmidt 2024-08-06 16:42:16 +02:00
parent 1dfcb4a4d5
commit c432e9a4f9

View File

@ -51,9 +51,9 @@ class Bot
$preg_pattern = sprintf('#%s#i', $pattern); $preg_pattern = sprintf('#%s#i', $pattern);
if (preg_match($preg_pattern, $sentence, $matches)) { if (preg_match($preg_pattern, $sentence, $matches)) {
if (is_callable($command)) { if (is_callable($command)) {
$command($this); call_user_func($command, $this);
} else { } else {
$command->getMessage($this, $matches); call_user_func([$command, 'getMessage'], $this, $matches);
} }
return; return;
} }