src/UI/Output.php
public static function doRedirect($location) {
        if ( headers_sent() ) {
            // TODO: Check if this is fixed in PHP 70200
            // https://bugs.php.net/bug.php?id=74892
            if ( PHP_VERSION_ID >= 70000 ) {
                $location = U::addSession($location);
            }
            echo('<a href="'.$location.'">Continue</a>'."\n");
        } else {
            if ( ini_get('session.use_cookies') == 0 ) {
                $location = U::addSession($location);
            }
            header("Location: $location");
        }
    }
public static function doRedirect($location) {
        if ( headers_sent() ) {
            // TODO: Check if this is fixed in PHP 70200
            // https://bugs.php.net/bug.php?id=74892
            if ( PHP_VERSION_ID >= 70000 ) {
                $location = U::addSession($location);
            }
            echo('<a href="'.$location.'">Continue</a>'."\n");
        } else {
            if ( ini_get('session.use_cookies') == 0 ) {
                $location = U::addSession($location);
            }
            header("Location: $location");
        }
    }
public static function doRedirect ( $ location ) { if ( headers_sent ( ) ) { // TODO: Check if this is fixed in PHP 70200 // https://bugs.php.net/bug.php?id=74892 if ( PHP_VERSION_ID >= 70000 ) { $ location = U :: addSession ( $ location ) ; } echo ( '<a href="' . $ location . '">Continue</a>' . "\n" ) ; } else { if ( ini_get ( 'session.use_cookies' ) == 0 ) { $ location = U :: addSession ( $ location ) ; } header ( "Location: $location" ) ; } }
Redirect to a local URL, adding session if necessary

Note that this is only needed for AJAX and header() calls
as &lt;form> and &lt;a href tags are properly handled already
by the PHP built-in "don't use cookies for session" support.
Redirect to a local URL adding session if necessary