From 8516b9fc2d42a99c362ffe5eac87043548158941 Mon Sep 17 00:00:00 2001 From: Roger Rehnelt Date: Sun, 27 Sep 2026 18:45:12 +0200 Subject: Gutschein-PDF: Deckkraft 0 wirkt (P12) Co-Authored-By: Claude Opus 5.5 --- views/mods/mod_voucherproduct/voucher_pdf.phtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/mods/mod_voucherproduct/voucher_pdf.phtml b/views/mods/mod_voucherproduct/voucher_pdf.phtml index 35e54f4..c66a960 100644 --- a/views/mods/mod_voucherproduct/voucher_pdf.phtml +++ b/views/mods/mod_voucherproduct/voucher_pdf.phtml @@ -30,7 +30,7 @@ $t['text'] = $this->replaceUniversalPlatzhalter($t['text'], $this->view['order_id'], false, false, $this->view['product_id'], $this->view['customReplace'], $this->view['product_index']); - if ($t['alpha'] > 0) $pdf->setAlpha($t['alpha']); + $pdf->setAlpha((($t['alpha'] ?? '') === '') ? 1 : min(1, max(0, floatval(str_replace(',', '.', $t['alpha']))))); $pdf->wpsg_SetTextColor($t['color']); @@ -70,7 +70,7 @@ $t['text'] = $this->replaceUniversalPlatzhalter($t['text'], $this->view['order_id'], false, false, $this->view['product_id'], $this->view['customReplace'], $this->view['product_index']); - if ($t['alpha'] > 0) $pdf->setAlpha($t['alpha']); + $pdf->setAlpha((($t['alpha'] ?? '') === '') ? 1 : min(1, max(0, floatval(str_replace(',', '.', $t['alpha']))))); $pdf->SetFont('Arial', '', $t['fontsize']); $pdf->wpsg_SetTextColor($t["color"]); -- cgit v1.2.3