Skip to content

A free open source IT asset/license management system

Fix 2D barcode defaults

cram42b72c6b7afc40
diff --git a/app/View/Label.php b/app/View/Label.php
index 67742d88e6..de955afffa 100644
--- a/app/View/Label.php
+++ b/app/View/Label.php
@@ -124,9 +124,9 @@ class Label implements View
if ($template->getSupport2DBarcode()) {
$barcode2DType = $settings->label2_2d_type;
$barcode2DType = ($barcode2DType == 'default') ?
- (($settings->qr_code) ? $settings->barcode_type : null) :
+ $settings->barcode_type :
$barcode2DType;
- if ($barcode2DType != 'none') {
+ if (($barcode2DType != 'none') && (!is_null($barcode2DType))) {
switch ($settings->label2_2d_target) {
case 'ht_tag': $barcode2DTarget = route('ht/assetTag', $asset->asset_tag); break;
case 'hardware_id':