Hi,

I just tried iCalendar to generate ics files. But I can't get it to work, I run into some weird error concerning the php native isempty function.

I'm running iCalendar 2.001 and php5 RC2

This is my code:

require_once "ical/class.iCal.inc.php";

$oIcal = new iCal('', 1 , "calendars");

$oIcal->addEvent(array('Timmie', 'tim@tim.net'), // Organizer
                time() + 2 * 60 * 60, // Start Time (timestamp; for an allday event the startdate has to start at YYYY-mm-dd 00:00:00)
                time() + 3 * 60 * 60, // End Time (write 'allday' for an allday event instead of a timestamp)
                'Somewhere', // Location
                0, // Transparancy (0 = OPAQUE | 1 = TRANSPARENT)
                array("KKiCalEvent"), // Array with Strings
                'See homepage for more details...', // Description
                'DS', // Title
                1, // Class (0 = PRIVATE | 1 = PUBLIC | 2 = CONFIDENTIAL)
                '', // Array (key = attendee name, value = e-mail, second value = role of the attendee [0 = CHAIR | 1 = REQ | 2 = OPT | 3 =NON])
                5, // Priority = 0-9
                0, // frequency: 0 = once, secoundly - yearly = 1-7
                '', // recurrency end: ('' = forever | integer = number of times | timestring = explicit date)
                '', // Interval for frequency (every 2,3,4 weeks...)
                array(), // Array with the number of the days the event accures (example: array(0,1,5) = Sunday, Monday, Friday
                0, // Startday of the Week ( 0 = Sunday - 6 = Saturday)
                '', // exeption dates: Array with timestamps of dates that should not be includes in the recurring event
                '',  // Sets the time in minutes an alarm appears before the event in the programm. no alarm if empty string or 0
                0, // Status of the event (0 = TENTATIVE, 1 = CONFIRMED, 2 = CANCELLED)
                'http://www.example.com/', // optional URL for that event
                'de', // Language of the Strings
                '' // Optional UID for this event
               );

$oIcal->outputFile('ics'); // output file as ics (xcs and rdf possible)

This is what I get in the returned ics file:

Fatal error:  Non-static method iCal::isEmpty() cannot be called statically in /usr/local/apache/htdocs/kk2005/ical/class.iCal.inc.php on line 915