We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 19e3818 commit 79f047aCopy full SHA for 79f047a
EventListener/AlertifyListener.php
@@ -12,6 +12,7 @@
12
namespace Troopers\AlertifyBundle\EventListener;
13
14
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
15
+use Symfony\Component\HttpFoundation\RedirectResponse;
16
use Symfony\Component\HttpFoundation\Request;
17
use Symfony\Component\HttpFoundation\Response;
18
use Symfony\Component\HttpFoundation\Session\Session;
@@ -57,6 +58,10 @@ public function onKernelResponse(FilterResponseEvent $event)
57
58
*/
59
protected function injectAlertify(Response $response, Request $request)
60
{
61
+ if ($response instanceof RedirectResponse) {
62
+ return;
63
+ }
64
+
65
$content = $response->getContent();
66
$pos = strripos($content, '</body>');
67
0 commit comments