mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Try / catch for epc qr codes
This commit is contained in:
parent
a8fcec8ace
commit
aade9c8f0b
@ -48,8 +48,12 @@ class EpcQrGenerator
|
|||||||
|
|
||||||
$this->validateFields();
|
$this->validateFields();
|
||||||
|
|
||||||
|
try {
|
||||||
$qr = $writer->writeString($this->encodeMessage());
|
$qr = $writer->writeString($this->encodeMessage());
|
||||||
|
}
|
||||||
|
catch(\Exception $e){
|
||||||
|
return '';
|
||||||
|
}
|
||||||
return "<svg viewBox='0 0 200 200' width='200' height='200' x='0' y='0' xmlns='http://www.w3.org/2000/svg'>
|
return "<svg viewBox='0 0 200 200' width='200' height='200' x='0' y='0' xmlns='http://www.w3.org/2000/svg'>
|
||||||
<rect x='0' y='0' width='100%'' height='100%' />{$qr}</svg>";
|
<rect x='0' y='0' width='100%'' height='100%' />{$qr}</svg>";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user