WP_HTTP: Respect that some cookies do not have an expiration time, this is a valid use-case that WP_HTTP_Cookie::test() should not discard, a non-existant expiration date simply means to let it expire at the end of the session. Props mailnew2ster. Fixes #14191
git-svn-id: https://develop.svn.wordpress.org/trunk@21226 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f2bd679b96
commit
ceec50af94
@ -1550,7 +1550,7 @@ class WP_Http_Cookie {
|
|||||||
*/
|
*/
|
||||||
function test( $url ) {
|
function test( $url ) {
|
||||||
// Expires - if expired then nothing else matters
|
// Expires - if expired then nothing else matters
|
||||||
if ( time() > $this->expires )
|
if ( isset( $this->expires ) && time() > $this->expires )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Get details on the URL we're thinking about sending to
|
// Get details on the URL we're thinking about sending to
|
||||||
|
Loading…
Reference in New Issue
Block a user