mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge pull request #7963 from turbo124/v5-develop
Catch EPC QR failures
This commit is contained in:
commit
be8603ae5b
@ -48,8 +48,12 @@ class EpcQrGenerator
|
|||||||
|
|
||||||
$this->validateFields();
|
$this->validateFields();
|
||||||
|
|
||||||
$qr = $writer->writeString($this->encodeMessage());
|
try {
|
||||||
|
$qr = $writer->writeString($this->encodeMessage());
|
||||||
|
}
|
||||||
|
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'>
|
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>";
|
||||||
|
|
||||||
|
@ -164,7 +164,8 @@ class CompanyController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function create(CreateCompanyRequest $request)
|
public function create(CreateCompanyRequest $request)
|
||||||
{
|
{
|
||||||
$company = CompanyFactory::create(auth()->user()->company()->account->id);
|
$cf = new \App\Factory\CompanyFactory;
|
||||||
|
$company = $cf->create(auth()->user()->company()->account->id);
|
||||||
|
|
||||||
return $this->itemResponse($company);
|
return $this->itemResponse($company);
|
||||||
}
|
}
|
||||||
|
@ -40,12 +40,8 @@ use Symfony\Component\HttpFoundation\Request;
|
|||||||
|
|
||||||
class TaskSchedulerService
|
class TaskSchedulerService
|
||||||
{
|
{
|
||||||
public Scheduler $scheduler;
|
|
||||||
|
public function __construct(public Scheduler $scheduler) {}
|
||||||
public function __construct(Scheduler $scheduler)
|
|
||||||
{
|
|
||||||
$this->scheduler = $scheduler;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function store(Scheduler $scheduler, CreateScheduledTaskRequest $request)
|
public function store(Scheduler $scheduler, CreateScheduledTaskRequest $request)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user