Skip to content
This repository was archived by the owner on Aug 27, 2022. It is now read-only.

Commit

Permalink
api(print): check if QR-Code offset is numeric
Browse files Browse the repository at this point in the history
Change-Id: Iefa6f4666eaa337866ea0a6be8b8c96b6bade8eb
  • Loading branch information
andi34 committed Jan 24, 2022
1 parent e2934c1 commit 75eaaba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion api/print.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ function applyQR($sourceResource, $qrPath, $x, $y) {

list($qrWidth, $qrHeight) = getimagesize($filename_codes);

$offset = $config['print']['qrOffset'];
if (is_numeric($config['print']['qrOffset'])) {
$offset = $config['print']['qrOffset'];
} else {
$offset = 10;
}

switch ($config['print']['qrPosition']) {
case 'topLeft':
Expand Down

0 comments on commit 75eaaba

Please sign in to comment.