Index: parser_ical.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/parser_ical/parser_ical.module,v
retrieving revision 1.1.2.2
diff -r1.1.2.2 parser_ical.module
34,35c34,35
<       $ical_array = _parser_ical_feedapi_parse($url, FALSE);
<       if ($ical_array !== FALSE) {
---
>       $ical = _parser_ical_feedapi_parse($url, FALSE);
>       if ($ical !== FALSE) {
45c45,47
<       return _parser_ical_feedapi_parse($feed, $cache);
---
>       $ical = _parser_ical_feedapi_parse($feed, $cache);
>       // feedapi isn't handling FALSE nicely but it seems to be correct
>       return $ical;
68c70
<     return $downloaded_string;
---
>     return FALSE;
100c102,110
<   
---
> 
>   // it is possible to have a calender with no events
>   if (! isset($ical['VEVENT']) || ! count($ical['VEVENT'])) {
>     // tell the user if interactive
>     _parser_ical_set_message(t('No events found in the feed'), 'warning');
>     // nothing more to do
>     return $parsed_source;
>   }
> 
151c161
<   if (!empty($username)) {
---
>   if (! empty($username)) {
154a165,170
>   if (! empty($result->error)) {
>     $vars = array('%url' => $url, '%code' => (isset($result->code) && $result->code) ? $result->code : '', '%error' => $result->error);
>     _parser_ical_set_message(t('Failed to retrieve %url got error: %code %error', $vars), 'error');
>     watchdog('parser_ical', 'Failed to retrieve %url got error: %code %error', $vars, WATCHDOG_WARNING);
>     return FALSE;
>   }
156a173,186
> 
> /**
>  * drupal_set_message, but avoiding the dupes when called for test & parse.
>  *
>  * @param $message
>  *   string already passed through t().
>  */
> function _parser_ical_set_message($message, $type = 'status') {
>   static $reported = array();
>   if (! in_array($message, $reported)) {
>     drupal_set_message($message, $type);
>     $reported[] = $message;
>   }
> }
