From 7c43439224fb78785e4bc3e4ca1733de06fcc8ee Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Fri, 8 May 2020 12:32:46 +0200 Subject: [PATCH] getFData : fix PHP warning --- src/includes/functions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/includes/functions.php b/src/includes/functions.php index f5d69be4..fb464bec 100644 --- a/src/includes/functions.php +++ b/src/includes/functions.php @@ -60,7 +60,10 @@ function getFData($format,$data,$meth=NULL) { if(is_array($data)) { if ($meth==NULL) { while (preg_match($expr,$format[$i],$ch)) { - if (is_array($data[$ch[1]])) { + if (!isset($data[$ch[1]])) { + $val = ''; + } + elseif (is_array($data[$ch[1]])) { $val = $data[$ch[1]][0]; } else {