Update Contact.php
authorHeather Killam <heather.killam.kw@gmail.com>
Mon, 6 Jun 2016 14:33:06 +0000 (08:33 -0600)
committerHeather Killam <heather.killam.kw@gmail.com>
Mon, 6 Jun 2016 14:33:06 +0000 (08:33 -0600)
CRM/Contact/Form/Contact.php

index b94c37c7835badef7f9fcc8f190dd23fc786087b..412491bcc8b6ee0db04adf453d4c1625a4609d13 100644 (file)
@@ -1290,8 +1290,11 @@ 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 .= ' ';
+          $thesuffix = CRM_Utils_Array::value('street_number_suffix', $address);
+          if ($fld === 'street_number_suffix' && $thesuffix) {
+            if (ctype_digit(substr($thesuffix, 0, 1))) {
+              $streetAddress .= ' ';
+            }
           }
           $streetAddress .= CRM_Utils_Array::value($fld, $address);
         }