Skip to content

Commit 86f264a

Browse files
committed
Fix creation detection
1 parent 08dc844 commit 86f264a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Builder/Builder.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ public function build(
8888
$writerOptions = $writerOptions ?? $this->writerOptions;
8989
$validateResult = $validateResult ?? $this->validateResult;
9090

91+
$createLabel = $this->labelText || $labelText;
92+
$createLogo = $this->logoPath || $logoPath;
93+
9194
$qrCode = new QrCode(
9295
data: $data ?? $this->data,
9396
encoding: $encoding ?? $this->encoding,
@@ -99,14 +102,14 @@ public function build(
99102
backgroundColor: $backgroundColor ?? $this->backgroundColor
100103
);
101104

102-
$logo = $this->logoPath ? new Logo(
105+
$logo = $createLogo ? new Logo(
103106
path: $logoPath ?? $this->logoPath,
104107
resizeToWidth: $logoResizeToWidth ?? $this->logoResizeToWidth,
105108
resizeToHeight: $logoResizeToHeight ?? $this->logoResizeToHeight,
106109
punchoutBackground: $logoPunchoutBackground ?? $this->logoPunchoutBackground
107110
) : null;
108111

109-
$label = $this->labelText ? new Label(
112+
$label = $createLabel ? new Label(
110113
text: $labelText ?? $this->labelText,
111114
font: $labelFont ?? $this->labelFont,
112115
alignment: $labelAlignment ?? $this->labelAlignment,

0 commit comments

Comments
 (0)