HTTP API: Ensure cookie names are cast to strings.

Props nosilver4u, darssen, kraftbj, engahmeds3ed, barry.hughes, schlessera.
Fixes #58566.
Built from https://develop.svn.wordpress.org/trunk@57501


git-svn-id: http://core.svn.wordpress.org/trunk@57002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Pascal Birchler 2024-01-31 13:03:57 +00:00
parent 112955169b
commit 1942f49fe6
2 changed files with 3 additions and 3 deletions

View File

@ -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 );
}
}

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.5-alpha-57500';
$wp_version = '6.5-alpha-57501';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.