dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
objectcache: simplify WANObjectCache version handling code
[lhc/web/wiklou.git]
/
includes
/
libs
/
Cookie.php
diff --git
a/includes/libs/Cookie.php
b/includes/libs/Cookie.php
index
a67b919
..
b7636b1
100644
(file)
--- a/
includes/libs/Cookie.php
+++ b/
includes/libs/Cookie.php
@@
-58,11
+58,7
@@
class Cookie {
$this->expires = strtotime( $attr['expires'] );
}
$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'] ) ) {
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
* 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 ) {
* @return bool
*/
public static function validateCookieDomain( $domain, $originDomain = null ) {