From f890a44c8d53ed650081b29380c8c8d3c80eeac0 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Sat, 4 Dec 2021 09:34:55 +0100 Subject: [PATCH] PHP 8 Error on line 114 in single_crud_class.inc fixed. --- includes/ui/simple_crud_class.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/ui/simple_crud_class.inc b/includes/ui/simple_crud_class.inc index 40c8ebea..2669bf04 100644 --- a/includes/ui/simple_crud_class.inc +++ b/includes/ui/simple_crud_class.inc @@ -111,7 +111,7 @@ class simple_crud { if (isset($_POST[$this->name.$m])) { unset($_POST['_focus']); // focus on first form entry $Ajax->activate($this->name.'_div'); - $val = @key($_POST[$this->name.$m]); + $val = is_array($_POST[$this->name.$m]) ? key($_POST[$this->name.$m]) : null; $this->selected_id = $val!==null ? @quoted_printable_decode($val) : $this->_none; return $m; } -- 2.30.2