Mailing List Archive

[Davical-general] CalDAV client (v2) usage and possible bug
On Sat, 2011-04-16 at 16:09 +0200, Jorge L?pez P?rez wrote:
> Hi all,
>
> I'm doing some tests with caldav-client-v2.php intending to use it for
> doing some integration with a DAViCal server (0.9.9.4), but I'm having
> some trouble with the basics.
>
> I have tried the first sample commented at the end of the script (I'm
> just quoting important code):

Applied, thanks.

Cheers,
Andrew.
>
> --8<--
> $url = 'https://localhost/c/user1/calendario';
> $cal = new CalDAVClient($url, 'user1', $password, 'calendario');
> $events = $cal->GetEvents();
> -->8--
>
> When running this from command line I get the following errors:
>
> --8<--
> PHP Notice: Undefined offset: 1 in
> /home/jorge/public_html/davical-0.9.9.4/inc/caldav-client-v2.php on line 281
>
> Notice: Undefined offset: 1 in
> /home/jorge/public_html/davical-0.9.9.4/inc/caldav-client-v2.php on line 281
> PHP Notice: Undefined property: CalDAVClient::$xmltags in
> /home/jorge/public_html/davical-0.9.9.4/inc/caldav-client-v2.php on line 818
>
> Notice: Undefined property: CalDAVClient::$xmltags in
> /home/jorge/public_html/davical-0.9.9.4/inc/caldav-client-v2.php on line 818
> PHP Warning: Invalid argument supplied for foreach() in
> /home/jorge/public_html/davical-0.9.9.4/inc/caldav-client-v2.php on line 818
>
> Warning: Invalid argument supplied for foreach() in
> /home/jorge/public_html/davical-0.9.9.4/inc/caldav-client-v2.php on line 818
> -->8--
>
> After some 'trial and error', I changed the GetEvents() call to
> include the calendar URL as the third argument, but then I got lots of
> errors like this one:
>
> --8<--
> PHP Notice: Undefined index: tag in
> /home/jorge/public_html/davical-0.9.9.4/inc/caldav-client-v2.php on line 819
> -->8--
>
> Ok, so I've been studying the code and IMHO there seems to be a bug on
> the DoCalendarQuery function. I have attached a one-line patch that
> makes that simple script work (after changing the GetEvents() call). Now
> I can loop on events and retrieve data, etags and href.
>
> Anyway, am I doing something wrong with the call to GetEvents()? Do I
> really need to pass the calendar URL again?
>
> Taking advantage of this message, does anyone have a working example
> or know where can I find it?
>
> Thank you very much.
>
> Regards.
>
> ------------------------------------------------------------------------------
> Benefiting from Server Virtualization: Beyond Initial Workload
> Consolidation -- Increasing the use of server virtualization is a top
> priority.Virtualization can reduce costs, simplify management, and improve
> application availability and disaster protection. Learn more about boosting
> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
> _______________________________________________ Davical-general mailing list Davical-general at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/davical-general

--
------------------------------------------------------------------------
andrew (AT) morphoss (DOT) com +64(272)DEBIAN
Bruce Schneier writes his books and essays by generating random
alphanumeric text of an appropriate length and then decrypting it.

------------------------------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.davical.org/pipermail/davical-dev/attachments/20110513/a0ec3010/attachment.pgp>