From 785374a68289d770aa670c31db95ed9d88b01d74 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Wed, 11 Jun 2014 13:34:35 +1200 Subject: [PATCH] CRM-14838 tokens not working when value is rendered as an integer --- CRM/Utils/Address.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Utils/Address.php b/CRM/Utils/Address.php index 83ccea7cd2..f4a66683a1 100644 --- a/CRM/Utils/Address.php +++ b/CRM/Utils/Address.php @@ -202,7 +202,7 @@ class CRM_Utils_Address { // for every token, replace {fooTOKENbar} with fooVALUEbar if // the value is not empty, otherwise drop the whole {fooTOKENbar} foreach ($replacements as $token => $value) { - if ($value && is_string($value)) { + if ($value && is_string($value) || is_numeric($value)) { $formatted = preg_replace("/{([^{}]*)\b{$token}\b([^{}]*)}/u", "\${1}{$value}\${2}", $formatted); } else { -- 2.25.1