diff options
author | Jim Hu <jimhu@users.sourceforge.net> | 2008-12-26 17:07:52 +0000 |
---|---|---|
committer | Jim Hu <jimhu@users.sourceforge.net> | 2008-12-26 17:07:52 +0000 |
commit | 65c00ba1223eb97ff618fd661402a74c037c58cd (patch) | |
tree | 3f22f787cda6dead8286e5433caf63114df6f2da | |
parent | a02ca8fd76dfa6b0f280780f76fb9bfce5a9fd36 (diff) | |
download | phpicalendar-65c00ba1223eb97ff618fd661402a74c037c58cd.tar.gz phpicalendar-65c00ba1223eb97ff618fd661402a74c037c58cd.tar.bz2 phpicalendar-65c00ba1223eb97ff618fd661402a74c037c58cd.zip |
squelch warnings in event.php
-rw-r--r-- | functions/ical_parser.php | 4 | ||||
-rw-r--r-- | functions/parse/parse_tzs.php | 10 | ||||
-rw-r--r-- | includes/event.php | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/functions/ical_parser.php b/functions/ical_parser.php index 23c31c1..febe27f 100644 --- a/functions/ical_parser.php +++ b/functions/ical_parser.php @@ -233,11 +233,9 @@ foreach ($cal_filelist as $cal_key=>$filename) { if (ereg ("([^:]+):(.*)", $line, $line)){ $field = $line[1]; $data = $line[2]; - - $property = $field; + $property = strtoupper($field); $prop_pos = strpos($property,';'); if ($prop_pos !== false) $property = substr($property,0,$prop_pos); - $property = strtoupper($property); switch ($property) { diff --git a/functions/parse/parse_tzs.php b/functions/parse/parse_tzs.php index 734851e..8b02cb5 100644 --- a/functions/parse/parse_tzs.php +++ b/functions/parse/parse_tzs.php @@ -54,13 +54,13 @@ while (!feof($ifile)) { ); #echo "<pre>$tz_id"; print_r($tz_array[$tz_id]);echo"</pre>"; break; default: - unset ( $data, $prop_pos, $property); - if (ereg ("([^:]+):(.*)", $line, $arr)){ - $property = $arr[1]; - $data = $arr[2]; + unset ($field, $data, $prop_pos, $property); + if (ereg ("([^:]+):(.*)", $line, $line)){ + $field = $line[1]; + $data = $line[2]; + $property = strtoupper($field); $prop_pos = strpos($property,';'); if ($prop_pos !== false) $property = substr($property,0,$prop_pos); - $property = strtoupper($property); switch ($property) { case 'TZID': $tz_id = $data; diff --git a/includes/event.php b/includes/event.php index fe03042..a198469 100644 --- a/includes/event.php +++ b/includes/event.php @@ -28,6 +28,7 @@ if ($event['description']) $event['description'] = ereg_replace("[[:alpha:]]+:// if (isset($organizer) && is_array($organizer)) { $i=0; $display .= $lang['l_organizer'] . ' - '; + $organizers = array(); foreach ($organizer as $val) { $organizers[] = $organizer[$i]["name"]; $i++; @@ -37,6 +38,7 @@ if (isset($organizer) && is_array($organizer)) { if (isset($attendee) && is_array($attendee)) { $i=0; $display .= $lang['l_attendee'] . ' - '; + $attendees = array(); foreach ($attendee as $val) { $attendees[] .= $attendee[$i]["name"]; $i++; |