Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit df88fdb

Browse files
committed
Do not throw when setSaveHandler is called and headers have already been sent
1 parent 99f8d85 commit df88fdb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ public function setSaveHandler($saveHandler = null)
396396
}
397397

398398
if (headers_sent($file, $line)) {
399-
throw new \RuntimeException(sprintf('Failed to set the session handler because headers have already been sent by "%s" at line %d.', $file, $line));
399+
// throw new \RuntimeException(sprintf('Failed to set the session handler because headers have already been sent by "%s" at line %d.', $file, $line));
400400
}
401401

402402
// Wrap $saveHandler in proxy and prevent double wrapping of proxy

0 commit comments

Comments
 (0)