catch php errors to return valid JSON when invoking API, refs #1047
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -56,6 +56,12 @@ final class RunApiCommand extends CliCommand
|
||||
|
||||
require Froxlor::getInstallDir() . '/lib/functions.php';
|
||||
|
||||
// set error-handler
|
||||
@set_error_handler([
|
||||
'\\Froxlor\\Api\\Api',
|
||||
'phpErrHandler'
|
||||
]);
|
||||
|
||||
if ($result == self::SUCCESS) {
|
||||
try {
|
||||
$loginname = $input->getArgument('user');
|
||||
|
||||
Reference in New Issue
Block a user