| @@ -2416,9 +2416,10 @@ | ||
| 2416 | 2416 | $this->errorMessage = ""; |
| 2417 | 2417 | $this->errorCode = ""; |
| 2418 | 2418 | $error = false; |
| 2419 | 2419 | |
| 2420 | - $post_vars = http_build_query($params, null, "&"); | |
| 2420 | + //260830.2347 PHP 8.1+ deprecates null for http_build_query()'s string $numeric_prefix argument; '' preserves the historical query output. | |
| 2421 | + $post_vars = http_build_query($params, '', "&"); | |
| 2421 | 2422 | |
| 2422 | 2423 | $s2_ags = array("user-agent" => "MCAPI/" . $this->version, "timeout" => $this->timeout); |
| 2423 | 2424 | $s2_url = $host . $this->apiUrl["path"] . "?" . $this->apiUrl["query"] . "&method=" . $method; |
| 2424 | 2425 | $s2_url = ($this->secure) ? "https://" . $s2_url : "http://" . $s2_url; |
| @@ -2429,9 +2430,10 @@ | ||
| 2429 | 2430 | return false; |
| 2430 | 2431 | } |
| 2431 | 2432 | |
| 2432 | 2433 | $headers = $_response["headers"]; |
| 2433 | - $body = $response = maybe_unserialize($_response["body"]); | |
| 2434 | + //260808 Safely unserialize the Mailchimp API response. | |
| 2435 | + $body = $response = c_ws_plugin__s2member_utils_arrays::maybe_unserialize($_response["body"]); | |
| 2434 | 2436 | |
| 2435 | 2437 | if (!empty($headers["x-mailchimp-api-error-code"])){ |
| 2436 | 2438 | $error = trim($headers["x-mailchimp-api-error-code"]); |
| 2437 | 2439 | } |