1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 22:22:32 +01:00

Fixes for EPC failures

This commit is contained in:
David Bomba 2023-10-09 20:40:53 +11:00
parent 60e5bd6e63
commit 28b30e719a

View File

@ -53,12 +53,17 @@ class EpcQrGenerator
$this->validateFields();
$qr = $writer->writeString($this->encodeMessage(), 'utf-8');
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>";
} catch(\Throwable $e) {
return '';
} 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'>
<rect x='0' y='0' width='100%'' height='100%' />{$qr}</svg>";
}
public function encodeMessage()