kopia lustrzana https://github.com/friendica/friendica
Fix returns in Console commands
rodzic
01ba276455
commit
4b971f84fd
|
@ -144,6 +144,8 @@ HELP;
|
|||
|
||||
}
|
||||
$this->out($table->getTable());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -158,9 +158,10 @@ HELP;
|
|||
|
||||
if ($result['success']) {
|
||||
$this->out('User ' . $user['nickname'] . ' now connected to ' . $url . ', contact ID ' . $result['cid']);
|
||||
} else {
|
||||
throw new RuntimeException($result['message']);
|
||||
return true;
|
||||
}
|
||||
|
||||
throw new RuntimeException($result['message']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -122,7 +122,7 @@ HELP;
|
|||
case 'search':
|
||||
return $this->searchUser();
|
||||
case 'config':
|
||||
return $this->configUser();
|
||||
return ($this->configUser()) ? 0 : 1;
|
||||
default:
|
||||
throw new \Asika\SimpleConsole\CommandArgsException('Wrong command.');
|
||||
}
|
||||
|
@ -513,6 +513,6 @@ HELP;
|
|||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue