Skip to content

Commit

Permalink
Set alpha to 0 when not passed
Browse files Browse the repository at this point in the history
  • Loading branch information
endroid committed Jan 19, 2018
1 parent 6174b4f commit 11de346
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/QrCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ public function getMargin(): int

public function setForegroundColor(array $foregroundColor): void
{
if (!isset($foregroundColor['a'])) {
$foregroundColor['a'] = 0;
}

$this->foregroundColor = $foregroundColor;
}

Expand All @@ -108,6 +112,10 @@ public function getForegroundColor(): array

public function setBackgroundColor(array $backgroundColor): void
{
if (!isset($backgroundColor['a'])) {
$backgroundColor['a'] = 0;
}

$this->backgroundColor = $backgroundColor;
}

Expand Down

0 comments on commit 11de346

Please sign in to comment.