Merge pull request #4372 from davecivicrm/CRM-15467
[civicrm-core.git] / CRM / Utils / Address.php
index 66587ccda082a292b0fda7ff6fba69bcee9c18c9..c024acc78d9e4a697039c8c4cf0d7bdc5665f723 100644 (file)
@@ -206,7 +206,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 {