From: Chuck Scott Date: Mon, 26 Feb 2018 19:43:41 +0000 (-0500) Subject: Fixed undefined index issue when location city not available. X-Git-Tag: v1.6.78^2~7 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=74a9dba46f4ee6eaa5d3c4cb9afe9f6eb5892c44;p=WP-Plugins%2Fglm-member-db-events.git Fixed undefined index issue when location city not available. --- diff --git a/classes/data/dataEvents.php b/classes/data/dataEvents.php index aa45d50..382ab5c 100644 --- a/classes/data/dataEvents.php +++ b/classes/data/dataEvents.php @@ -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']