From ed071cce4e979c946633ee9056905053a4725f74 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Sat, 4 Dec 2021 10:36:20 +0100 Subject: [PATCH] PHP 8 error on line 257 in simple_crud_class.inc fixed. --- includes/ui/simple_crud_class.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/ui/simple_crud_class.inc b/includes/ui/simple_crud_class.inc index 2669bf04..f6375635 100644 --- a/includes/ui/simple_crud_class.inc +++ b/includes/ui/simple_crud_class.inc @@ -254,10 +254,10 @@ class simple_crud { $post = isset($fmt['post']) ? $fmt['post'] : $name; $fld = isset($fmt['fld']) ? $fmt['fld'] : $name; - $value = $this->selected_id == $this->_none ? @$fmt['dflt'] : + $value = $this->selected_id == $this->_none ? (isset($fmt['dflt']) ? $fmt['dflt'] : null) : (is_array($this->data) ? $this->data[$fld]: $this->data->$fld); - $_POST[$post] = $this->_format_output($value, @$fmt['fmt']); + $_POST[$post] = $this->_format_output($value, isset($fmt['fmt']) ? $fmt['fmt'] : null); } } //-------------------------- -- 2.30.2