public function getGeoLocation($address)
{
+ if ( empty( array_filter( $address ) ) ) {
+ return false;
+ }
foreach ($address as $key => &$part) {
$part = urlencode($part);
}
$eventData['other_ref_dest'] = $other_ref_dest;
$eventDataFormat[] = '%d';
}
- if ( $user_member_location = filter_var( $_REQUEST['use_member_location'], FILTER_VALIDATE_BOOLEAN ) ) {
+ if ( isset( $_REQUEST['use_member_location'] ) && $user_member_location = filter_var( $_REQUEST['use_member_location'], FILTER_VALIDATE_BOOLEAN ) ) {
$eventData['use_member_location'] = $user_member_location;
$eventDataFormat[] = '%s';
}
'%s',
'%s'
);
- if ($lat && $lon) {
+ if ( isset( $lat ) && isset( $lon ) && $lat && $lon) {
$locationData['lat'] = $lat;
$locationData['lon'] = $lon;
$locationDataFormat[] = '%s';