From: Marcin Haba Date: Tue, 1 May 2018 05:56:36 +0000 (+0200) Subject: baculum: Fix not showing 'gui on' command in bconsole output X-Git-Tag: Release-9.2.0~81 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4743212a377246673794e25aef62c85353070a8;p=thirdparty%2Fbacula.git baculum: Fix not showing 'gui on' command in bconsole output --- diff --git a/gui/baculum/protected/API/Class/Bconsole.php b/gui/baculum/protected/API/Class/Bconsole.php index 255a50172..c3433aa87 100644 --- a/gui/baculum/protected/API/Class/Bconsole.php +++ b/gui/baculum/protected/API/Class/Bconsole.php @@ -130,10 +130,10 @@ class Bconsole extends APIModule { } private function prepareResult(array $output, $exitcode, $bconsole_command) { - array_shift($output); // deleted 'gui on' array_pop($output); // deleted 'quit' bconsole command - for($i = 0; $i < count($output); $i++) { - if(strstr($output[$i], $bconsole_command) == false) { + $out = $output; + for($i = 0; $i < count($out); $i++) { + if(strstr($out[$i], $bconsole_command) == false) { unset($output[$i]); } else { break;