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

Catch EPC QR failures

This commit is contained in:
David Bomba 2022-11-21 19:12:51 +11:00
parent aade9c8f0b
commit 79d032fa4b
2 changed files with 4 additions and 8 deletions

View File

@ -49,9 +49,9 @@ class EpcQrGenerator
$this->validateFields();
try {
$qr = $writer->writeString($this->encodeMessage());
$qr = $writer->writeString($this->encodeMessage());
}
catch(\Exception $e){
catch(BaconQrCode\Exception\WriterException $e){
return '';
}
return "<svg viewBox='0 0 200 200' width='200' height='200' x='0' y='0' xmlns='http://www.w3.org/2000/svg'>

View File

@ -40,12 +40,8 @@ use Symfony\Component\HttpFoundation\Request;
class TaskSchedulerService
{
public Scheduler $scheduler;
public function __construct(Scheduler $scheduler)
{
$this->scheduler = $scheduler;
}
public function __construct(public Scheduler $scheduler) {}
public function store(Scheduler $scheduler, CreateScheduledTaskRequest $request)
{