From a9bcaffef7b2f716cc269389cfd4b9e615ee7325 Mon Sep 17 00:00:00 2001 From: Marcin Haba Date: Sun, 12 Aug 2018 11:48:24 +0200 Subject: [PATCH] baculum: Fix saving logs when an error occurs --- gui/baculum/protected/Web/Class/BaculumAPIClient.php | 2 ++ 1 file changed, 2 insertions(+) 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(); } -- 2.47.3