Skip to content

Commit

Permalink
Fix header warnings from log flushing
Browse files Browse the repository at this point in the history
Fixes #1168
  • Loading branch information
toth-dev committed Jul 31, 2019
1 parent a938fcb commit adc33dd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/SimpleSAML/Logger.php
Expand Up @@ -371,8 +371,13 @@ public static function popErrorMask()
*/
private static function defer($level, $message, $stats)
{
// so that the headers are not sent by flush
\SimpleSAML\Session::getSessionFromRequest();

// save the message for later
self::$earlyLog[] = ['level' => $level, 'string' => $message, 'statsLog' => $stats];
self::$earlyLog[] = [
'level' => $level, 'string' => $message, 'statsLog' => $stats
];

// register a shutdown handler if needed
if (!self::$shutdownRegistered) {
Expand Down

0 comments on commit adc33dd

Please sign in to comment.