X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Flibs%2FCookie.php;h=b7636b147678e0453732fb41a7e7cdb655d3bff8;hb=f43e8dc7132911414f502a388e1199b3adcf49e6;hp=a67b919f47b280312a8e6715445730745c856212;hpb=75cdcc94007dca953927b13db411aac94750b074;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/Cookie.php b/includes/libs/Cookie.php index a67b919f47..b7636b1476 100644 --- a/includes/libs/Cookie.php +++ b/includes/libs/Cookie.php @@ -58,11 +58,7 @@ class Cookie { $this->expires = strtotime( $attr['expires'] ); } - if ( isset( $attr['path'] ) ) { - $this->path = $attr['path']; - } else { - $this->path = '/'; - } + $this->path = $attr['path'] ?? '/'; if ( isset( $attr['domain'] ) ) { if ( self::validateCookieDomain( $attr['domain'] ) ) { @@ -86,7 +82,7 @@ class Cookie { * not a big problem in practice, but there are test cases) * * @param string $domain The domain to validate - * @param string $originDomain (optional) the domain the cookie originates from + * @param string|null $originDomain (optional) the domain the cookie originates from * @return bool */ public static function validateCookieDomain( $domain, $originDomain = null ) {