mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Don’t 500 if the 1D barcode doesn’t match the format requested - log an error instead
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
ffc7c4e99a
commit
45898deb1a
|
@ -370,7 +370,11 @@ abstract class Label
|
|||
*/
|
||||
public final function write1DBarcode(TCPDF $pdf, $value, $type, $x, $y, $width, $height) {
|
||||
if (empty($value)) return;
|
||||
$pdf->write1DBarcode($value, $type, $x, $y, $width, $height, null, ['stretch'=>true]);
|
||||
try {
|
||||
$pdf->write1DBarcode($value, $type, $x, $y, $width, $height, null, ['stretch'=>true]);
|
||||
} catch (\Exception $e) {
|
||||
\Log::error('The 1D barcode ' . $value . ' is not compliant with the barcode type '. $type);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue