From 28d82c9b0431256e122cf5b1cac4f75178d75722 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Sat, 7 Jul 2012 12:06:09 +0000 Subject: [PATCH] WP_HTTP: Allow for cookies with "empty" values be sent, this affects sending cookies such as test=0, which would previously fail. Props mailnew2ster for initial patch. See #14184 git-svn-id: https://develop.svn.wordpress.org/trunk@21227 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 90e05e55be..179ea2fd06 100644 --- a/wp-includes/class-http.php +++ b/wp-includes/class-http.php @@ -1590,7 +1590,7 @@ class WP_Http_Cookie { * @return string Header encoded cookie name and value. */ function getHeaderValue() { - if ( empty( $this->name ) || empty( $this->value ) ) + if ( ! isset( $this->name ) || ! isset( $this->value ) ) return ''; return $this->name . '=' . apply_filters( 'wp_http_cookie_value', $this->value, $this->name );