Qual: Handle case where code to convert is <false>

This commit is contained in:
MDW 2025-01-05 16:58:53 +01:00
parent 7847da3c11
commit ac9301dc8f
No known key found for this signature in database

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -159,6 +159,7 @@ class modPhpbarcode extends ModeleBarCode
$filebarcode = '';
}
$result = "No barcode ($code) to print";
dol_syslog(get_class($this)."::buildBarCode $code,$encoding,$scale,$mode,$filebarcode");
if ($code) {
$result = barcode_print($code, $encoding, $scale, $mode, $filebarcode);