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

Clean up error logs

This commit is contained in:
Hillel Coren 2017-08-07 14:09:49 +03:00
parent 252c6f0a56
commit 8c326e3dbc

View File

@ -33,7 +33,11 @@ class CreatePaymentAPIRequest extends PaymentRequest
$this->invoice = $invoice = Invoice::scope($this->invoice_id)
->withArchived()
->invoices()
->firstOrFail();
->first();
if (! $this->invoice) {
abort(404, 'Invoice was not found');
}
$this->merge([
'invoice_id' => $invoice->id,