From a0c883da59786e2c1a5a6f808d87dd2ffcc8dcf3 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 6 Dec 2021 11:17:27 -0500 Subject: [PATCH] Afform - Be more forgiving about input format when saving an afform --- ext/afform/core/Civi/Api4/Utils/AfformFormatTrait.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/afform/core/Civi/Api4/Utils/AfformFormatTrait.php b/ext/afform/core/Civi/Api4/Utils/AfformFormatTrait.php index f70b36143e..2ed0d3c5c6 100644 --- a/ext/afform/core/Civi/Api4/Utils/AfformFormatTrait.php +++ b/ext/afform/core/Civi/Api4/Utils/AfformFormatTrait.php @@ -54,7 +54,7 @@ trait AfformFormatTrait { * @throws \API_Exception */ protected function convertInputToHtml($mixed) { - if ($this->layoutFormat === 'html') { + if (is_string($mixed)) { return $mixed; } $converter = new \CRM_Afform_ArrayHtml($this->layoutFormat !== 'shallow', $this->formatWhitespace); -- 2.25.1