fix not send logout for expired sessions for PHP 8

also change alert for exceptions to egw.message($msg, 'error')
This commit is contained in:
Ralf Becker 2021-04-02 11:09:24 +02:00
parent 7135243d06
commit 00f2c12771

View File

@ -33,7 +33,7 @@ function login_redirect(&$anon_account)
$response->redirect($GLOBALS['egw_info']['server']['webserver_url'].'/login.php?cd=10', true); $response->redirect($GLOBALS['egw_info']['server']['webserver_url'].'/login.php?cd=10', true);
// under PHP 8 the destructor is called to late and the response is not send // under PHP 8 the destructor is called to late and the response is not send
Json\Response::sendResult(); $GLOBALS['egw']->__destruct();
exit(); exit();
} }
@ -65,10 +65,10 @@ function ajax_exception_handler($e)
{ {
$message .= "\n\n".$e->getTraceAsString(); $message .= "\n\n".$e->getTraceAsString();
} }
$response->alert($message); $response->message($message, 'error');
// under PHP 8 the destructor is called to late and the response is not send // under PHP 8 the destructor is called to late and the response is not send
Json\Response::sendResult(); $GLOBALS['egw']->__destruct();
exit; exit;
} }