From b399940ef5356281e4dc0eb83421ba27404e3ebc Mon Sep 17 00:00:00 2001 From: Danny Gershman Date: Wed, 3 Apr 2019 08:08:49 -0400 Subject: [PATCH] fixes for sms link were throwing errors --- endpoints/meeting-search.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/endpoints/meeting-search.php b/endpoints/meeting-search.php index 94da5c68b..cd385c454 100644 --- a/endpoints/meeting-search.php +++ b/endpoints/meeting-search.php @@ -94,8 +94,10 @@ function sendSms($message) for ($i = 0; $i < count($filtered_list); $i++) { $results = getResultsString($filtered_list[$i]); $location_line = (has_setting('include_location_text') && json_decode(setting('include_location_text'))) ? $results[2] . $text_space . $results[3] : $results[3]; - $maplink_line = (has_setting('include_map_link') && json_decode(setting('include_map_link'))) ? $results[4] .= " https://google.com/maps?q=" . $filtered_list[$i]->latitude . "," . $filtered_list[$i]->longitude : $results[4]; - $message = $results[0] . $text_space . $results[1] . $text_space . $location_line . $maplink_line; + $message = $results[0] . $text_space . $results[1] . $text_space . $location_line; + if (has_setting('include_map_link') && json_decode(setting('include_map_link'))) { + $message .= " https://google.com/maps?q=" . $filtered_list[$i]->latitude . "," . $filtered_list[$i]->longitude; + } if (json_decode(setting("sms_ask")) && !isset($_REQUEST["SmsSid"])) { array_push($sms_messages, $message);