From 20c818cf9712b033d4f98303fc8daeb1df1385ed Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 6 Mar 2020 07:30:12 +1100 Subject: [PATCH] Minor fixes. (#3430) * Fix for pdf_variables * Fixes for notification * Fixes for viewing invoice with NO company custom_fields --- app/Designs/Designer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Designs/Designer.php b/app/Designs/Designer.php index 63b395ecb4de..5a59b917f0f7 100644 --- a/app/Designs/Designer.php +++ b/app/Designs/Designer.php @@ -361,7 +361,7 @@ class Designer { $custom_fields = $company->custom_fields; if (!$custom_fields) { - return []; + return $data; } foreach (self::$custom_fields as $cf) { @@ -385,7 +385,7 @@ class Designer { foreach ($matches as $match) { - if (!property_exists($custom_fields, $match) || (strlen($custom_fields->{ $match}) == 0)) { + if (!property_exists($custom_fields, $match) || (strlen($custom_fields->{$match}) == 0)) { foreach ($variables as $key => $value) { if ($value == $match) { unset($variables[$key]);