Skip to content

Commit

Permalink
Key became lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
tvlooy committed Jul 24, 2020
1 parent 518f0cb commit 1fa3182
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/Command/Accounts/CreateAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ public function prepare(): void

public function processResponse(array $response)
{
$link = $response['headers']['location'][0];
if (isset($response['headers']['Location'])) {
$link = $response['headers']['Location'][0];
} else {
$link = $response['headers']['location'][0];
}
$id = substr($link, strrpos($link, '/') + 1);

return $id;
Expand Down
6 changes: 5 additions & 1 deletion src/Command/Dns/CreateRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ public function prepare(): void

public function processResponse(array $response)
{
return explode('/', current($response['headers']['Location']))[5];
if (isset($response['headers']['Location'])) {
return explode('/', current($response['headers']['Location']))[5];
}

return explode('/', current($response['headers']['location']))[5];
}
}
6 changes: 5 additions & 1 deletion src/Command/Domains/RegisterDomain.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ public function prepare(): void

public function processResponse(array $response)
{
return explode('/', $response['headers']['Location'][0])[3];
if (isset($response['headers']['Location'])) {
return explode('/', $response['headers']['Location'][0])[3];
}

return explode('/', $response['headers']['location'][0])[3];
}
}
6 changes: 5 additions & 1 deletion src/Command/MysqlDatabases/CreateMysqlDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ public function prepare(): void

public function processResponse(array $response)
{
return explode('/', $response['headers']['Location'][0])[3];
if (isset($response['headers']['Location'])) {
return explode('/', $response['headers']['Location'][0])[3];
}

return explode('/', $response['headers']['location'][0])[3];
}
}

0 comments on commit 1fa3182

Please sign in to comment.