Fix PHP notices in HTTP API Cookies, props beaulebens, fixes #9068
git-svn-id: http://svn.automattic.com/wordpress/trunk@10524 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
da29afdf3b
commit
dad4caa7e5
|
@ -1385,12 +1385,18 @@ class WP_Http_Cookie {
|
|||
$this->$key = $val;
|
||||
}
|
||||
} else {
|
||||
if ( !isset( $data['name'] ) )
|
||||
return false;
|
||||
|
||||
// Set properties based directly on parameters
|
||||
$this->name = $data['name'];
|
||||
$this->value = $data['value'];
|
||||
$this->value = isset( $data['value'] ) ? $data['value'] : '';
|
||||
$this->path = isset( $data['path'] ) ? $data['path'] : '';
|
||||
$this->domain = isset( $data['domain'] ) ? $data['domain'] : '';
|
||||
if ( isset( $data['expires'] ) )
|
||||
$this->expires = is_int( $data['expires'] ) ? $data['expires'] : strtotime( $data['expires'] );
|
||||
$this->path = $data['path'];
|
||||
$this->domain = $data['domain'];
|
||||
else
|
||||
$this->expires = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue