From 2005aed7e6b6e94d8e43ae9217c3e9c43b471dbc Mon Sep 17 00:00:00 2001 From: dd32 Date: Sat, 7 Jul 2012 04:23:49 +0000 Subject: [PATCH] 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: http://core.svn.wordpress.org/trunk@21226 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-http.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/class-http.php b/wp-includes/class-http.php index e01a53a879..90e05e55be 100644 --- a/wp-includes/class-http.php +++ b/wp-includes/class-http.php @@ -1550,7 +1550,7 @@ class WP_Http_Cookie { */ function test( $url ) { // Expires - if expired then nothing else matters - if ( time() > $this->expires ) + if ( isset( $this->expires ) && time() > $this->expires ) return false; // Get details on the URL we're thinking about sending to