diff --git a/lib/BaseStripeClient.php b/lib/BaseStripeClient.php index 5ac4e11de..bacdc409c 100644 --- a/lib/BaseStripeClient.php +++ b/lib/BaseStripeClient.php @@ -168,13 +168,12 @@ public function rawRequest($method, $path, $params, $opts) unset($opts['api_mode']); } if (\is_array($opts) && \array_key_exists('headers', $opts)) { - $opts = clone $opts; $headers = $opts['headers'] ?: []; unset($opts['headers']); } $opts = $this->defaultOpts->merge($opts, true); // Concatenate $headers to $opts->headers, removing duplicates. - $opts->headers = \array_unique(\array_merge($opts->headers, $headers)); + $opts->headers = \array_merge($opts->headers, $headers); $baseUrl = $opts->apiBase ?: $this->getApiBase(); $requestor = new \Stripe\ApiRequestor($this->apiKeyForRequest($opts), $baseUrl); list($response) = $requestor->request($method, $path, $params, $opts->headers, $apiMode);