Fixed undefined index issue when location city not available.
authorChuck Scott <cscott@gaslightmedia.com>
Mon, 26 Feb 2018 19:43:41 +0000 (14:43 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Mon, 26 Feb 2018 19:43:41 +0000 (14:43 -0500)
classes/data/dataEvents.php

index aa45d50..382ab5c 100644 (file)
@@ -500,7 +500,7 @@ class GlmDataEvents extends GlmDataAbstract
     {
 
         // Check that URLs have http:// in front of them.
-        if (strtolower(substr($r['url'],0,4)) != 'http') {
+        if (isset($r['url']) && strtolower(substr($r['url'],0,4)) != 'http') {
             $r['url'] = 'http://'.$r['url'];
         }
         
@@ -946,7 +946,7 @@ class GlmDataEvents extends GlmDataAbstract
                     'id' => $event['member']['city_id'],
                     'name' => $event['member']['city']
                 );
-            } elseif (isset($event['locations'])) {
+            } elseif (isset($event['locations']) && isset($event['locations']['city'])) {
                 $eventCities[$event['locations']['city']['value']] = array(
                     'id' => $event['locations']['city']['value'],
                     'name' => $event['locations']['city']['name']