sintonia/legacy/application/common/SessionHelper.php

15 lines
514 B
PHP
Raw Permalink Normal View History

<?php
class SessionHelper
{
2021-10-11 16:10:47 +02:00
public static function reopenSessionForWriting()
{
// PHP will send double Set-Cookie headers if we reopen the
// session for writing, and this breaks IE8 and some other browsers.
// This hacky workaround prevents double headers. Background here:
// https://bugs.php.net/bug.php?id=38104
ini_set('session.cache_limiter', null);
session_start(); // Reopen the session for writing (without resending the Set-Cookie header)
}
2021-10-11 16:10:47 +02:00
}