From: Marcin Haba Date: Tue, 23 Apr 2019 04:12:20 +0000 (+0200) Subject: baculum: Fix returning one line output from bconsole X-Git-Tag: Release-9.4.3~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f32a6fae9f782368af9ba561715f82a08a2cf880;p=thirdparty%2Fbacula.git baculum: Fix returning one line output from bconsole --- diff --git a/gui/baculum/protected/API/Class/Bconsole.php b/gui/baculum/protected/API/Class/Bconsole.php index b2aef0c5b..f1c801384 100644 --- a/gui/baculum/protected/API/Class/Bconsole.php +++ b/gui/baculum/protected/API/Class/Bconsole.php @@ -145,7 +145,7 @@ class Bconsole extends APIModule { break; } } - $output = count($output) > 1 ? array_values($output) : array_shift($output); + $output = array_values($output); return (object)array('output' => $output, 'exitcode' => (integer)$exitcode); }