We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c5af0b commit 721f194Copy full SHA for 721f194
src/Api/ProductMediaFileApi.php
@@ -130,14 +130,12 @@ public function download(string $code): ResponseInterface
130
*/
131
protected function extractCodeFromCreationResponse(ResponseInterface $response)
132
{
133
- $headers = $response->getHeaders();
134
-
135
- if (isset($headers['Location'][0])) {
136
- $locationHeader = $headers['Location'][0];
+ if ($response->hasHeader('Location')) {
+ $locationHeader = $response->getHeader('Location')[0];
137
}
138
139
- if (isset($headers['location'][0])) {
140
- $locationHeader = $headers['location'][0];
+ if ($response->hasHeader('location')) {
+ $locationHeader = $response->getHeader('location')[0];
141
142
143
if (!isset($locationHeader)) {
0 commit comments