From 206efd1fc09486a70acf081b8442049fd2ff1d44 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 8 Jan 2017 22:00:37 +0200 Subject: [PATCH] Enable viewing draft invoices with link --- app/Ninja/Repositories/InvoiceRepository.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Ninja/Repositories/InvoiceRepository.php b/app/Ninja/Repositories/InvoiceRepository.php index e5285d97fb..943e8ed430 100644 --- a/app/Ninja/Repositories/InvoiceRepository.php +++ b/app/Ninja/Repositories/InvoiceRepository.php @@ -315,8 +315,7 @@ class InvoiceRepository extends BaseRepository return $invoice; } - // set default to true for backwards compatability - if ( ! isset($data['is_public']) || filter_var($data['is_public'], FILTER_VALIDATE_BOOLEAN)) { + if (isset($data['is_public']) && filter_var($data['is_public'], FILTER_VALIDATE_BOOLEAN)) { $invoice->is_public = true; if ( ! $invoice->isSent()) { $invoice->invoice_status_id = INVOICE_STATUS_SENT;