From d759e4b5a9125a443d44946bd880cd1453801d70 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 21 Nov 2020 18:55:39 +0100 Subject: [PATCH] * Tracker: fix empty notification mail, if ticket was opened by following a link in notification mail --- api/src/Etemplate.php | 6 +++++- json.php | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/api/src/Etemplate.php b/api/src/Etemplate.php index f1e369c806..143b96113c 100644 --- a/api/src/Etemplate.php +++ b/api/src/Etemplate.php @@ -486,7 +486,11 @@ class Etemplate extends Etemplate\Widget\Template //error_log(__METHOD__."(,".array2string($content).')'); //error_log(' validated='.array2string($validated)); - return ExecMethod(self::$request->method, self::complete_array_merge(self::$request->preserv, $validated)); + ExecMethod(self::$request->method, self::complete_array_merge(self::$request->preserv, $validated)); + + // run egw destructor now explicit, in case a (notification) email is send via Egw::on_shutdown(), + // as stream-wrappers used by Horde Smtp fail when PHP is already in destruction + $GLOBALS['egw']->__destruct(); } public $name; diff --git a/json.php b/json.php index c1303dfe07..cb7686d9a8 100644 --- a/json.php +++ b/json.php @@ -129,6 +129,9 @@ try { $json->parseRequest($_GET['menuaction'], $_REQUEST['json_data']); } Json\Response::get(); + + // run egw destructor now explicit, in case a (notification) email is send via Egw::on_shutdown(), + // as stream-wrappers used by Horde Smtp fail when PHP is already in destruction $GLOBALS['egw']->__destruct(); } // missing menuaction GET parameter or request:parameters object or unparsable JSON