Browse Source

fixed issue with catchall for ical timezones (#1772)

CauseFX 4 years ago
parent
commit
8f9dabf6ec
2 changed files with 2 additions and 2 deletions
  1. 1 1
      api/homepage/ical.php
  2. 1 1
      api/v2/index.php

+ 1 - 1
api/homepage/ical.php

@@ -75,7 +75,7 @@ trait ICalHomepageItem
 				$timezone = 'Europe/Lisbon';
 				$timezone = 'Europe/Lisbon';
 				break;
 				break;
 		}
 		}
-		return $timezone;
+		return in_array($timezone, timezone_identifiers_list()) ? $timezone : 'UTC';
 	}
 	}
 
 
 	public function getCalendarExtraDates($start, $rule, $timezone)
 	public function getCalendarExtraDates($start, $rule, $timezone)

+ 1 - 1
api/v2/index.php

@@ -52,7 +52,7 @@ $GLOBALS['bypass'] = array(
 $GLOBALS['responseCode'] = 200;
 $GLOBALS['responseCode'] = 200;
 function jsonE($json)
 function jsonE($json)
 {
 {
-	return safe_json_encode($json, JSON_HEX_QUOT | JSON_HEX_TAG | JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
+	return safe_json_encode($json, JSON_HEX_QUOT | JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); // JSON_HEX_TAG
 }
 }
 
 
 function getBasePath()
 function getBasePath()