Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/Connector/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ public function getVersion(): string
*/
public function modifyOptions(): array
{
// Combine options set globally e.g. headers with options set by individual API calls e.g. form_params.
$options = $this->options + $this->requestOptions;
// Combine options set globally e.g. headers with options set by individual API calls e.g. form_params,
// using array_merge_recursive to ensure nested arrays like headers are merged rather than overwritten.
$options = array_merge_recursive($this->requestOptions, $this->options);

// This library can be standalone or as a dependency. Dependent libraries may also set their own user agent
// which will make $options['headers']['User-Agent'] an array.
Expand Down
Loading