Skip to content

Commit 1ca995a

Browse files
committed
:octocat: QRMarkupSVG::paths(): ignore non-existent module values
1 parent 19f4fcc commit 1ca995a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Output/QRMarkupSVG.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,16 @@ protected function paths():string{
9191
continue;
9292
}
9393

94-
$format = empty($this->moduleValues[$M_TYPE])
94+
// ignore non-existent module values
95+
$format = !isset($this->moduleValues[$M_TYPE]) || empty($this->moduleValues[$M_TYPE])
9596
? '<path class="%1$s" d="%2$s"/>'
9697
: '<path class="%1$s" fill="%3$s" fill-opacity="%4$s" d="%2$s"/>';
9798

9899
$svg[] = sprintf(
99100
$format,
100101
$this->getCssClass($M_TYPE),
101102
$path,
102-
$this->moduleValues[$M_TYPE],
103+
$this->moduleValues[$M_TYPE] ?? '',
103104
$this->options->svgOpacity)
104105
;
105106
}

0 commit comments

Comments
 (0)