mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-19 06:53:53 +01:00
LScli : fix warnings about run_command CLI
This commit is contained in:
parent
fbba445106
commit
4828ac6b30
1 changed files with 2 additions and 2 deletions
|
@ -208,7 +208,7 @@ class LScli {
|
|||
* @param[in] $error string|false Error message to display before usage message (optional, default: false)
|
||||
* @retval void
|
||||
**/
|
||||
public function run_command($command, $command_args=array(), $exit=true) {
|
||||
public static function run_command($command, $command_args=array(), $exit=true) {
|
||||
if (php_sapi_name() != "cli") {
|
||||
LSlog :: fatal('Try to use LScli :: run_command() in non-CLI context.');
|
||||
return;
|
||||
|
@ -226,7 +226,7 @@ class LScli {
|
|||
}
|
||||
|
||||
// Run command
|
||||
LSlog :: debug('Run '.basename($argv[0])." command $command with argument(s) '".implode("', '", $command_args)."'");
|
||||
LSlog :: debug("Run command $command with argument(s) '".implode("', '", $command_args)."'");
|
||||
try {
|
||||
$result = call_user_func(self :: $commands[$command]['handler'], $command_args);
|
||||
|
||||
|
|
Loading…
Reference in a new issue