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: http://core.svn.wordpress.org/trunk@21227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2005aed7e6
commit
4db9e5c605
|
@ -1590,7 +1590,7 @@ class WP_Http_Cookie {
|
||||||
* @return string Header encoded cookie name and value.
|
* @return string Header encoded cookie name and value.
|
||||||
*/
|
*/
|
||||||
function getHeaderValue() {
|
function getHeaderValue() {
|
||||||
if ( empty( $this->name ) || empty( $this->value ) )
|
if ( ! isset( $this->name ) || ! isset( $this->value ) )
|
||||||
return '';
|
return '';
|
||||||
|
|
||||||
return $this->name . '=' . apply_filters( 'wp_http_cookie_value', $this->value, $this->name );
|
return $this->name . '=' . apply_filters( 'wp_http_cookie_value', $this->value, $this->name );
|
||||||
|
|
Loading…
Reference in New Issue