Skip to content

Commit c91f0ce

Browse files
authored
Update wp_http_fetch.php
Using `''` instead of `null` to prevent the following error: ```json { “type”:“deprecated”, “message”:“http_build_query(): Passing null to parameter WordPress#2 ($numeric_prefix) of type string is deprecated”,“file”:“wp-content/mu-plugins/playground-includes/wp_http_fetch.php”,“line”:113,“stack”:[“http_build_query()“,”Wp_Http_Fetch_Base::format_get()“,”Wp_Http_Fetch_Base->request()“,”WpOrg\Requests\Requests::request()“,”WP_Http->request()“,”WP_Http->get()“,”wp_remote_get()“,”WP_Community_Events->get_events()“,”wp_ajax_get_community_events()“,”do_action(‘wp_ajax_get-community-events’)“],“component”:“MU Plugin: playground-includes” } ```
1 parent 1c0f359 commit c91f0ce

File tree

1 file changed

+1
-1
lines changed
  • packages/playground/remote/src/lib/playground-mu-plugin/playground-includes

1 file changed

+1
-1
lines changed

packages/playground/remote/src/lib/playground-mu-plugin/playground-includes/wp_http_fetch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ protected static function format_get($url, $data)
110110
} else {
111111
$query = $url_parts['query'];
112112
}
113-
$query .= '&' . http_build_query($data, null, '&');
113+
$query .= '&' . http_build_query($data, '', '&');
114114
$query = trim($query, '&');
115115
if (empty($url_parts['query'])) {
116116
$url .= '?' . $query;

0 commit comments

Comments
 (0)