Commit 2db0fd90 authored by Aaron Wells's avatar Aaron Wells Committed by Robert Lyon
Browse files

Correcting typoes in cookie-issuing code

Bug 1570744: Accidentally used set_cookie() instead of
setcookie(). This makes the cookie break if you use
the $cfg->cookieprefix setting.

behatnotneeded: Covered by existing tests

Change-Id: Idec3676222e3ff4eb22f7925de6bec10cfa35755
parent 0ea25ccb
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -392,7 +392,10 @@ class Session {
            // will be ignored, and instead the old session cookie will
            // be replaced by the new one.)
            if (isset($_COOKIE[session_name()])) {
                setcookie(session_name(), '', time() - 65536,
                setcookie(
                    session_name(),
                    '',
                    1,
                    ini_get('session.cookie_path'),
                    ini_get('session.cookie_domain'),
                    ini_get('session.cookie_secure'),
@@ -556,10 +559,11 @@ function clear_duplicate_cookies() {

    // Now manually regenerate just ONE session cookie header.
    if ($SESSION->session_id()) {
        set_cookie(
        setcookie(
            $cookiename,
            $SESSION->session_id(),
            0,
            ini_get('session.cookie_path'),
            ini_get('session.cookie_domain'),
            ini_get('session.cookie_secure'),
            ini_get('session.cookie_httponly')