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

index c2dd280f8068852725ee3f33e28354b24c205e09..8184822aab8be6a799277b396dfa3d6920fee7d4 100644 (file)
@@ -355,8 +355,9 @@ 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))) {
+            $numsuffix = CRM_Utils_Array::value($fld, $address);
+            if ($fld === 'street_number_suffix' && !empty($numsuffix)) {
+              if (ctype_digit(substr($numsuffix, 0, 1))) {
                 $streetAddress .= ' ';
               }
             }