From 2a810055a7d1f084d5247f3ee2bf5ec2605d4699 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 26 Oct 2020 16:03:35 -0400 Subject: [PATCH] APIv4 - Fix type coersion of non-string input --- Civi/Api4/Utils/FormattingUtil.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Civi/Api4/Utils/FormattingUtil.php b/Civi/Api4/Utils/FormattingUtil.php index 82e1f77005..6b4ff620a0 100644 --- a/Civi/Api4/Utils/FormattingUtil.php +++ b/Civi/Api4/Utils/FormattingUtil.php @@ -124,7 +124,7 @@ class FormattingUtil { } $hic = \CRM_Utils_API_HTMLInputCoder::singleton(); - if (!$hic->isSkippedField($fieldSpec['name'])) { + if (!$hic->isSkippedField($fieldSpec['name']) && is_string($value)) { $value = $hic->encodeValue($value); } } -- 2.25.1