Skip to content

Commit

Permalink
Fix for empty IMSC_USERNAME (#2)
Browse files Browse the repository at this point in the history
* Fix for empty IMSC_USERNAME
* This should be strict
  • Loading branch information
cs-jako authored Jun 27, 2024
1 parent 93aaadb commit df35ecd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Immoscout/ApiRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public function __construct(?array $auth = null, ?string $user = null)
{
$this->client = $this->getPreparedClient($auth);
$this->user = $user ?? $_ENV['IMSC_USERNAME'] ?? 'me';
if (trim($this->user) === '') {
$this->user = 'me';
}
}

/**
Expand Down

0 comments on commit df35ecd

Please sign in to comment.