Fix unexpected EventDispatcher exception on logout

This commit is contained in:
Frédéric Guillot 2023-07-07 17:51:27 -07:00 committed by Frédéric Guillot
parent 07a0042520
commit f5d0555ebd
2 changed files with 4 additions and 2 deletions

View File

@ -6,6 +6,7 @@ use Exception;
use Kanboard\Core\Base;
use Kanboard\Job\BaseJob;
use SimpleQueue\Job;
use Symfony\Contracts\EventDispatcher\Event;
/**
* Class JobHandler
@ -84,6 +85,6 @@ class JobHandler extends Base
{
$this->memoryCache->flush();
$this->actionManager->removeEvents();
$this->dispatcher->dispatch('app.bootstrap');
$this->dispatcher->dispatch(new Event(), 'app.bootstrap');
}
}

View File

@ -3,6 +3,7 @@
namespace Kanboard\Core\Session;
use Kanboard\Core\Base;
use Symfony\Contracts\EventDispatcher\Event;
/**
* Session Manager
@ -59,7 +60,7 @@ class SessionManager extends Base
*/
public function close()
{
$this->dispatcher->dispatch(self::EVENT_DESTROY);
$this->dispatcher->dispatch(new Event(), self::EVENT_DESTROY);
// Destroy the session cookie
$params = session_get_cookie_params();