[CONTROLLER] Stop propagation of kernel.controller so notices aren't posted 5 times. Not sure why it happens otherwise

This commit is contained in:
Hugo Sales 2020-08-15 13:49:38 +00:00 committed by Hugo Sales
parent 6f01b0cebe
commit 9159fe8d05
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
1 changed files with 2 additions and 3 deletions

View File

@ -1,7 +1,6 @@
<?php
// {{{ License
// This file is part of GNU social - https://www.gnu.org/software/social
//
// GNU social is free software: you can redistribute it and/or modify
@ -16,7 +15,6 @@
//
// You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}}
/**
@ -42,7 +40,7 @@ use Symfony\Component\HttpKernel\KernelEvents;
class Controller extends AbstractController implements EventSubscriberInterface
{
private array $vars;
private array $vars = [];
public function __invoke(Request $request)
{
@ -63,6 +61,7 @@ class Controller extends AbstractController implements EventSubscriberInterface
$this->vars = ['controler' => $controller, 'request' => $request];
Event::handle('start_twig_populate_vars', [&$this->vars]);
$event->stopPropagation();
return $event;
}