CRM-17619 add space before numeric suffix
authorHeather Killam <heather.killam.kw@gmail.com>
Sun, 5 Jun 2016 23:26:28 +0000 (17:26 -0600)
committerHeather Killam <heather.killam.kw@gmail.com>
Sun, 5 Jun 2016 23:26:28 +0000 (17:26 -0600)
A third place with the same problem.

CRM/Contact/Form/Contact.php

index 8407b12c6731322af2d162294994a22d421d7c49..b9eca4a16aa5d17b44795050fdfff4fa73509985 100644 (file)
@@ -1289,6 +1289,10 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form {
           ))) {
             $streetAddress .= ' ';
           }
+          // CRM-17619 - if the street number suffix begins with a number, add a space
+          if ($fld === 'street_number_suffix' && ctype_digit(substr(CRM_Utils_Array::value($fld, $address), 0, 1))) {
+            $streetAddress .= ' ';
+          }            
           $streetAddress .= CRM_Utils_Array::value($fld, $address);
         }
         $address['street_address'] = trim($streetAddress);