DAViCal/davical — pull request #8 by althaus (2013-05-28 11:02:42+00:00)
Title: Fixed broken handle_schedule_reply

When `handle_schedule_reply` is called with a vCALENDAR missing an organizer, the code crashes:

```php
$organizer = $ical->GetOrganizer();
// for now we treat events with out organizers as an error
if ( count( $organizer ) < 1 ) return false;
```

due to the fact that `$ical->GetOrganizer()` returns 'FALSE', if no organizer is given:

```php
function GetOrganizer() {
if ( !isset($this->organizer) ) {
$organizers = $this->GetPropertiesByPath('/VCALENDAR/*/ORGANIZER');
$organizer = (count($organizers) > 0 ? $organizers[0] : false);
$this->organizer = (empty($organizer) ? false : $organizer );
---snip---
}
return $this->organizer;
}
```

I changed the check to use 'empty' instead which takes 'FALSE' and empty arrays.