projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
47a68a9
)
CRM-14838 tokens not working when value is rendered as an integer
author
Eileen McNaughton
<eileen@fuzion.co.nz>
Wed, 11 Jun 2014 01:34:35 +0000
(13:34 +1200)
committer
Eileen McNaughton
<eileen@fuzion.co.nz>
Wed, 11 Jun 2014 03:06:06 +0000
(15:06 +1200)
CRM/Utils/Address.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Utils/Address.php
b/CRM/Utils/Address.php
index 83ccea7cd201a7983e6c9bc05cb5ba7dff5f80c8..f4a66683a14d8ab248ef5ee88429ea5b6ead85f1 100644
(file)
--- 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 {