maicol07 When I echo Done at LoginMiddleware I get an output like below
Done
( ! ) Fatal error: Uncaught Laminas\HttpHandlerRunner\Exception\EmitterException: Output has been emitted previously; cannot emit response in C:\wamp64\www\sso\forum\vendor\laminas\laminas-httphandlerrunner\src\Exception\EmitterException.php on line 24
( ! ) Laminas\HttpHandlerRunner\Exception\EmitterException: Output has been emitted previously; cannot emit response in C:\wamp64\www\sso\forum\vendor\laminas\laminas-httphandlerrunner\src\Exception\EmitterException.php on line 24
Call Stack
Time Memory Function Location
1 0.0001 363392 {main}( ) ...\index.php:0
2 0.0027 387304 Flarum\Http\Server->listen( ) ...\index.php:26
3 0.0822 3048680 Laminas\HttpHandlerRunner\RequestHandlerRunner->run( ) ...\Server.php:44
4 0.1072 3877880 Laminas\HttpHandlerRunner\Emitter\SapiEmitter->emit( ) ...\RequestHandlerRunner.php:98
5 0.1072 3877880 Laminas\HttpHandlerRunner\Emitter\SapiEmitter->assertNoPreviousOutput( ) ...\SapiEmitter.php:27
this line 24 is the echo line which I put. It is getting redirected at the LoginMiddleware. This only happens when a user logged in for the first time after logging out.