summaryrefslogtreecommitdiffstats
path: root/wp-includes/class-wp-http.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-includes/class-wp-http.php')
-rw-r--r--wp-includes/class-wp-http.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/wp-includes/class-wp-http.php b/wp-includes/class-wp-http.php
index a30f9f7..4858068 100644
--- a/wp-includes/class-wp-http.php
+++ b/wp-includes/class-wp-http.php
@@ -467,9 +467,9 @@ class WP_Http {
return null !== $attr;
}
);
- $cookie_jar[ $value->name ] = new WpOrg\Requests\Cookie( $value->name, $value->value, $attributes, array( 'host-only' => $value->host_only ) );
+ $cookie_jar[ $value->name ] = new WpOrg\Requests\Cookie( (string) $value->name, $value->value, $attributes, array( 'host-only' => $value->host_only ) );
} elseif ( is_scalar( $value ) ) {
- $cookie_jar[ $name ] = new WpOrg\Requests\Cookie( $name, (string) $value );
+ $cookie_jar[ $name ] = new WpOrg\Requests\Cookie( (string) $name, (string) $value );
}
}
@@ -611,7 +611,7 @@ class WP_Http {
* @param string $url The request URL.
* @param string|array $args Optional. Override the defaults.
* @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'.
- * A WP_Error instance upon error.
+ * A WP_Error instance upon error. See WP_Http::response() for details.
*/
public function post( $url, $args = array() ) {
$defaults = array( 'method' => 'POST' );
@@ -629,7 +629,7 @@ class WP_Http {
* @param string $url The request URL.
* @param string|array $args Optional. Override the defaults.
* @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'.
- * A WP_Error instance upon error.
+ * A WP_Error instance upon error. See WP_Http::response() for details.
*/
public function get( $url, $args = array() ) {
$defaults = array( 'method' => 'GET' );
@@ -647,7 +647,7 @@ class WP_Http {
* @param string $url The request URL.
* @param string|array $args Optional. Override the defaults.
* @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'.
- * A WP_Error instance upon error.
+ * A WP_Error instance upon error. See WP_Http::response() for details.
*/
public function head( $url, $args = array() ) {
$defaults = array( 'method' => 'HEAD' );