From: Janusz Dobrowolski Date: Sat, 25 Mar 2023 20:48:17 +0000 (+0100) Subject: [0005684] Attach documents: error message when attaching document on some php8 versio... X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=b2b7e20b9372fc8fc002d8cf25f1d3c72917ea4f [0005684] Attach documents: error message when attaching document on some php8 versions fixed. --- diff --git a/includes/ui/simple_crud_class.inc b/includes/ui/simple_crud_class.inc index f6375635..f276c3b5 100644 --- a/includes/ui/simple_crud_class.inc +++ b/includes/ui/simple_crud_class.inc @@ -251,6 +251,9 @@ class simple_crud { $name = $fmt; $fmt = array(); } + if is_string($fmt) { + $fmt = array('fmt' => $fmt) + } $post = isset($fmt['post']) ? $fmt['post'] : $name; $fld = isset($fmt['fld']) ? $fmt['fld'] : $name; @@ -270,6 +273,9 @@ class simple_crud { $name = $fmt; $fmt = array(); } + if is_string($fmt) { + $fmt = array('fmt' => $fmt) + } $post = isset($fmt['post']) ? $fmt['post'] : $name; $fld = isset($fmt['fld']) ? $fmt['fld'] : $name;