Now not adding http:// to empty URLs.
authorChuck Scott <cscott@gaslightmedia.com>
Tue, 27 Feb 2018 19:17:15 +0000 (14:17 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Tue, 27 Feb 2018 19:17:15 +0000 (14:17 -0500)
classes/data/dataMemberInfo.php

index 1f41db4..5c56dbb 100644 (file)
@@ -564,10 +564,10 @@ class GlmDataMemberInfo extends GlmDataAbstract
         }
 
         // Check that URLs have http:// in front of them.
-        if (isset($r['url']) && strtolower(substr($r['url'],0,4)) != 'http') {
+        if (isset($r['url']) && strlen(trim($r['url'])) > 0  && strtolower(substr($r['url'],0,4)) != 'http') {
             $r['url'] = 'http://'.$r['url'];
         }
-        if (isset($r['reservation_url']) && strtolower(substr($r['reservation_url'],0,4)) != 'http') {
+        if (isset($r['reservation_url']) && strlen(trim($r['reservation_url'])) > 0 && strtolower(substr($r['reservation_url'],0,4)) != 'http') {
             $r['reservation_url'] = 'http://'.$r['reservation_url'];
         }