Merge pull request #23742 from eileenmcnaughton/import_remove
[civicrm-core.git] / CRM / Core / EntityTokens.php
index 1e5fc6827794a0f19c9474c3584cc5bd9bbffe76..8f7866971b5a5230c43acc062d5b08bea1896aa5 100644 (file)
@@ -120,6 +120,9 @@ class CRM_Core_EntityTokens extends AbstractTokenSubscriber {
     }
     if ($this->isMoneyField($field)) {
       $currency = $this->getCurrency($row);
+      if (empty($fieldValue) && !is_numeric($fieldValue)) {
+        $fieldValue = 0;
+      }
       if (!$currency) {
         // too hard basket for now - just do what we always did.
         return $row->format('text/plain')->tokens($entity, $field,