Skip to content

Commit

Permalink
[FINNA-2393] Add null coalescing to avoid PHP warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
EreMaijala committed Jun 27, 2024
1 parent fba4f21 commit ef4df90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/RecordManager/Base/Harvest/AbstractBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public function init(string $source, bool $verbose, bool $reharvest): void
}
$this->baseURL = $settings['url'];

if (($username = $settings['username']) && ($password = $settings['password'])) {
if (($username = $settings['username'] ?? null) && ($password = $settings['password'] ?? null)) {
$type = $settings['authType'] ?? 'basic';
$this->httpAuth = [$username, $password, $type];
}
Expand Down

0 comments on commit ef4df90

Please sign in to comment.