Merge "Make wfForeignMemcKey consistent with wfMemcKey"
[lhc/web/wiklou.git] / includes / WebResponse.php
index 0deae96..c2193fb 100644 (file)
@@ -54,7 +54,7 @@ class WebResponse {
        public function setcookie( $name, $value, $expire = 0, $prefix = null, $domain = null, $forceSecure = null ) {
                global $wgCookiePath, $wgCookiePrefix, $wgCookieDomain;
                global $wgCookieSecure, $wgCookieExpiration, $wgCookieHttpOnly;
-               if ( $expire == 0 ) {
+               if ( $expire == 0 && $wgCookieExpiration != 0 ) {
                        $expire = time() + $wgCookieExpiration;
                }
                if ( $prefix === null ) {