Update Address.php
authorHeather Killam <heather.killam.kw@gmail.com>
Tue, 7 Jun 2016 02:12:09 +0000 (20:12 -0600)
committerHeather Killam <heather.killam.kw@gmail.com>
Tue, 7 Jun 2016 02:12:09 +0000 (20:12 -0600)
CRM/Contact/Form/Edit/Address.php

index effbc4224e470855146d63f8282544ce757900f5..c2dd280f8068852725ee3f33e28354b24c205e09 100644 (file)
@@ -354,6 +354,12 @@ class CRM_Contact_Form_Edit_Address {
             ))) {
               $streetAddress .= ' ';
             }
+            // CRM-17619 - if the street number suffix begins with a number, add a space
+            if ($fld === 'street_number_suffix' && !empty(CRM_Utils_Array::value($fld, $address))) {
+              if (ctype_digit(substr(CRM_Utils_Array::value($fld, $address), 0, 1))) {
+                $streetAddress .= ' ';
+              }
+            }
             $streetAddress .= CRM_Utils_Array::value($fld, $address);
           }
           $streetAddress = trim($streetAddress);