From: Marcin Haba Date: Sun, 12 Aug 2018 09:48:24 +0000 (+0200) Subject: baculum: Fix saving logs when an error occurs X-Git-Tag: Release-9.2.2~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a9bcaffef7b2f716cc269389cfd4b9e615ee7325;p=thirdparty%2Fbacula.git baculum: Fix saving logs when an error occurs --- diff --git a/gui/baculum/protected/Web/Class/BaculumAPIClient.php b/gui/baculum/protected/Web/Class/BaculumAPIClient.php index 2823cb9d3..ab11e4592 100644 --- a/gui/baculum/protected/Web/Class/BaculumAPIClient.php +++ b/gui/baculum/protected/Web/Class/BaculumAPIClient.php @@ -467,6 +467,8 @@ class BaculumAPIClient extends WebModule { if ($show_error === true && $resource->error != 0) { $url = $this->Service->constructUrl('BaculumError', (array)$resource, false); header("Location: $url"); + // write all logs before exiting, otherwise they will be lost + $this->getModule('log')->collectLogs(null); exit(); }