also run Egw::__destruct() explicit for notifications

This commit is contained in:
Ralf Becker 2020-11-22 11:50:20 +01:00
parent d759e4b5a9
commit aa62a5ea3e
2 changed files with 5 additions and 0 deletions

View File

@ -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;
}

View File

@ -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;
}