From 3e21c301a553479124719dc472e802e7cd5f1d3a Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sat, 24 Oct 2020 18:01:07 +1100 Subject: [PATCH] Fix for custom values --- app/Utils/HtmlEngine.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Utils/HtmlEngine.php b/app/Utils/HtmlEngine.php index 6c3cafa73a0e..94a36c88b9c2 100644 --- a/app/Utils/HtmlEngine.php +++ b/app/Utils/HtmlEngine.php @@ -501,7 +501,9 @@ class HtmlEngine if ($custom_fields && property_exists($custom_fields, $field)) { $custom_field = $custom_fields->{$field}; $custom_field_parts = explode('|', $custom_field); - $custom_field = $custom_field_parts[1]; + + if(count($custom_field_parts) >= 2) + $custom_field = $custom_field_parts[1]; } switch ($custom_field) { @@ -510,7 +512,7 @@ class HtmlEngine break; default: - return $value; + return is_null($value) ? '' : $value; break; } }