From aa62a5ea3e500d9f085e1b582bd9a3fd824ecf07 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 22 Nov 2020 11:50:20 +0100 Subject: [PATCH] also run Egw::__destruct() explicit for notifications --- api/src/Framework.php | 3 +++ api/src/Framework/Extra.php | 2 ++ 2 files changed, 5 insertions(+) diff --git a/api/src/Framework.php b/api/src/Framework.php index 63d36f110b..02d8914d27 100644 --- a/api/src/Framework.php +++ b/api/src/Framework.php @@ -251,6 +251,9 @@ abstract class Framework extends Framework\Extra // commit session (if existing), to fix timing problems sometimes preventing session creation ("Your session can not be verified") if (isset($GLOBALS['egw']->session)) $GLOBALS['egw']->session->commit_session(); + // 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(); exit; } diff --git a/api/src/Framework/Extra.php b/api/src/Framework/Extra.php index 16fe3c5e16..80053cf0c4 100644 --- a/api/src/Framework/Extra.php +++ b/api/src/Framework/Extra.php @@ -128,6 +128,8 @@ abstract class Extra { $GLOBALS['egw']->framework->render('', false, false); } + // 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(); exit; }