From 92c1126f395042b93965ba3cbcd874e31a8f0383 Mon Sep 17 00:00:00 2001 From: stonebuzz Date: Fri, 15 Dec 2023 11:43:33 +0100 Subject: [PATCH 1/2] Fix(Fields): display generic label if not available --- inc/field.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/field.class.php b/inc/field.class.php index 80fb1859..f6cdf2db 100644 --- a/inc/field.class.php +++ b/inc/field.class.php @@ -609,7 +609,8 @@ public function showSummary($container) echo ""; echo ""; - echo "getID()}'>{$this->fields['label']}"; + $label = !empty($this->fields['label']) ? $this->fields['label'] : __('No label defined', 'fields'); + echo "getID()}'>{$label}"; echo ""; echo "" . $fields_type[$this->fields['type']] . ""; echo "" ; From 65e8a3eef1dcdbae596384492e6e3294c8a5d0a5 Mon Sep 17 00:00:00 2001 From: Stanislas Date: Thu, 21 Dec 2023 16:41:51 +0100 Subject: [PATCH 2/2] Use generic constant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cédric Anne --- inc/field.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/field.class.php b/inc/field.class.php index f6cdf2db..5739e94e 100644 --- a/inc/field.class.php +++ b/inc/field.class.php @@ -609,7 +609,7 @@ public function showSummary($container) echo ""; echo ""; - $label = !empty($this->fields['label']) ? $this->fields['label'] : __('No label defined', 'fields'); + $label = !empty($this->fields['label']) ? $this->fields['label'] : NOT_AVAILABLE; echo "getID()}'>{$label}"; echo ""; echo "" . $fields_type[$this->fields['type']] . "";