Skip to content

Commit

Permalink
Empty TZID
Browse files Browse the repository at this point in the history
One of our customer export ICS from "Microsoft Corporation//Outlook 14.0 MIMEDIR//EN"
Configured TZID is empty..

```
BEGIN:VTIMEZONE
TZID:
BEGIN:STANDARD
```

This commit allow a fallback to the default timezone value instead of a PHP fatal error.
  • Loading branch information
armetiz committed Dec 14, 2017
1 parent 2781c06 commit 99a2a23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/TimeZoneUtil.php
Expand Up @@ -135,7 +135,7 @@ static function getTimeZone($tzid, Component $vcalendar = null, $failIfUncertain
// Since PHP 5.5.10, the first bit will be used as the timezone and
// this method will return just GMT+01:00. This is wrong, because it
// doesn't take DST into account.
if ($tzid[0] !== '(') {
if (!empty($tzid) && $tzid[0] !== '(') {

// PHP has a bug that logs PHP warnings even it shouldn't:
// https://bugs.php.net/bug.php?id=67881
Expand Down

0 comments on commit 99a2a23

Please sign in to comment.