Skip to content

Commit 8e5967b

Browse files
author
Jamie Hannaford
committed
Merge pull request #344 from tmilos/RegionLessCatalogService
CatalogService does not initialize region if regionless = true
2 parents b28780d + cc2fce4 commit 8e5967b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/OpenCloud/Common/Service/CatalogService.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ public function __construct(ClientInterface $client, $type = null, $name = null,
7474

7575
$this->name = $name ? : static::DEFAULT_NAME;
7676

77-
if ($this->regionless !== true && !($this->region = $region)) {
77+
$this->region = $region;
78+
if ($this->regionless !== true && !$this->region) {
7879
throw new Exceptions\ServiceException(sprintf(
7980
'The %s service must have a region set. You can either pass in a region string as an argument param, or'
8081
. ' set a default region for your user account by executing User::setDefaultRegion and ::update().',

0 commit comments

Comments
 (0)