From 8f8553996e9daa62c21cc03de79fc53b0c3bb424 Mon Sep 17 00:00:00 2001 From: Ortwin Pinke Date: Sat, 22 Jul 2023 18:19:42 +0200 Subject: [PATCH] fix add new client --- conlite/includes/include.client_edit.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conlite/includes/include.client_edit.php b/conlite/includes/include.client_edit.php index 811e7ae..a01b453 100644 --- a/conlite/includes/include.client_edit.php +++ b/conlite/includes/include.client_edit.php @@ -232,7 +232,8 @@ if (!$perm->have_perm_area_action($area)) { $tpl->set('d', 'CATNAME', i18n("Client name")); $tpl->set('d', 'BGCOLOR', $cfg["color"]["table_dark"]); $tpl->set('d', "BORDERCOLOR", $cfg["color"]["table_border"]); - $tpl->set('d', 'CATFIELD', formGenerateField("text", "clientname", clHtmlSpecialChars($db->f("name")), 50, 255)); + $clientName = is_null($db->f("name"))?'':clHtmlSpecialChars($db->f("name")); + $tpl->set('d', 'CATFIELD', formGenerateField("text", "clientname", $clientName, 50, 255)); $tpl->set('d', 'BRDRT', 0); $tpl->set('d', 'BRDRB', 1); $tpl->set('d', 'FONT', 'text_medium');