Check length of the member url
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 19 Sep 2017 17:12:36 +0000 (13:12 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 19 Sep 2017 17:12:36 +0000 (13:12 -0400)
If it is longer than 255 then shorten the url.
It will fail to insert the member profile if it is longer than 255.

models/admin/management/import/members.php

index 29e18f7..bdb3b91 100644 (file)
@@ -854,7 +854,7 @@ if (!$failure) {
                     'region'         => (isset($region[$val['region']]) ? $region[$val['region']]['new_id'] : 0),
                     'phone'          => $val['phone'],
                     'toll_free'      => $val['toll_free'],
-                    'url'            => $val['url'],
+                    'url'            => ((strlen($val['url']) > 255) ?  substr($val['url'], 0, 250) : $val['url']),
                     'email'          => $val['member_contact_email'],
                     'logo'           => '',
                     'cc_type'        => $ccBits,