Compare commits

..

2 Commits

Author SHA1 Message Date
Dave Mc Nicoll
aba0ec3458 Merge branch 'master' of https://git.mcnd.ca/mcndave/ulmus-api 2023-11-17 16:02:05 -05:00
Dave Mc Nicoll
c026762fdb - Fixed ternary where a false value was provided whenever the env var was empty 2023-11-17 16:01:54 -05:00

View File

@ -39,7 +39,7 @@ class Rest implements AdapterInterface
public function setup(array $configuration): void public function setup(array $configuration): void
{ {
$this->auth = AuthenticationEnum::from($configuration['auth'] ?? AuthenticationEnum::Basic->value); $this->auth = AuthenticationEnum::from($configuration['auth'] ?: AuthenticationEnum::Basic->value);
$this->url = rtrim($configuration['url'], '/'); $this->url = rtrim($configuration['url'], '/');
foreach([ 'username', 'password', 'token', 'headers', 'options' ] as $conf) { foreach([ 'username', 'password', 'token', 'headers', 'options' ] as $conf) {