mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Try / Catch on delete PDF
This commit is contained in:
parent
e489cf6cb9
commit
39b99c4d78
@ -331,12 +331,19 @@ class InvoiceService
|
|||||||
|
|
||||||
$this->invoice->invitations->each(function ($invitation){
|
$this->invoice->invitations->each(function ($invitation){
|
||||||
|
|
||||||
|
try{
|
||||||
|
|
||||||
Storage::disk(config('filesystems.default'))->delete($this->invoice->client->invoice_filepath($invitation) . $this->invoice->numberFormatter().'.pdf');
|
Storage::disk(config('filesystems.default'))->delete($this->invoice->client->invoice_filepath($invitation) . $this->invoice->numberFormatter().'.pdf');
|
||||||
|
|
||||||
if(Ninja::isHosted()) {
|
if(Ninja::isHosted()) {
|
||||||
Storage::disk('public')->delete($this->invoice->client->invoice_filepath($invitation) . $this->invoice->numberFormatter().'.pdf');
|
Storage::disk('public')->delete($this->invoice->client->invoice_filepath($invitation) . $this->invoice->numberFormatter().'.pdf');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}catch(\Exception $e){
|
||||||
|
nlog($e->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user