The conditional is nominally more performant and considerably more readable
with its constituents flipped. Also adds an explanatory note. Prompted by
confusion over change Ie89507f8e98c365df9d93a7633223103b9025790.
Change-Id: I2d3db63bdbcebe0fd59c063c9f371362c9d07f91
$secureCookie = $forceSecure;
}
- $httpOnlySafe = wfHttpOnlySafe() && $wgCookieHttpOnly;
+ // Mark the cookie as httpOnly if $wgCookieHttpOnly is true,
+ // unless the requesting user-agent is known to have trouble with
+ // httpOnly cookies.
+ $httpOnlySafe = $wgCookieHttpOnly && wfHttpOnlySafe();
+
wfDebugLog( 'cookie',
'setcookie: "' . implode( '", "',
array(