Last active
October 11, 2015 18:48
-
-
Save neverything/3903478 to your computer and use it in GitHub Desktop.
Nasty fix to pass fixed cookie value in WP_Http_Cookie
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//... | |
// Replace space with + from cookie value | |
// because WP_Http_Cookie does urldecode( value ) | |
// which is fucking wrong. | |
$response['cookies'][0]->value = str_replace(' ', '+', $response['cookies'][0]->value); | |
// Set cookies for the second request | |
$this->cookies = $response['cookies']; | |
//... | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment