Skip to content

Commit

Permalink
Fix: this is an array
Browse files Browse the repository at this point in the history
  • Loading branch information
tvlooy committed Apr 24, 2020
1 parent ff40fe0 commit 9d0e4f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Command/Dns/CreateRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ public function prepare(): void

public function processResponse(array $response)
{
return explode('/', $response['headers']['Location'])[5];
return explode('/', current($response['headers']['Location']))[5];
}
}
2 changes: 1 addition & 1 deletion tests/Command/Dns/CreateRecordTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function testCreateARecord(): void
'status' => 201,
'headers' => [
'Content-Length' => ['0'],
'Location' => '/v2/dns/example.com/records/1-9988776610',
'Location' => ['/v2/dns/example.com/records/1-9988776610'],
'X-RateLimit-Limit' => ['100'],
'X-RateLimit-Usage' => ['1'],
'X-RateLimit-Remaining' => ['99'],
Expand Down

0 comments on commit 9d0e4f9

Please sign in to comment.