[geeklog-devel] Site breaks when there is one or more upcoming event?

Blank, Jessica Jessica.Blank at mtvnmix.com
Thu Mar 6 14:50:02 EST 2008


AH HAH! That's the source of the problem! Yes, yes. Could you please put the initialisation into the current CVS version of the code?

-----Original Message-----
From: geeklog-devel-bounces at lists.geeklog.net on behalf of Joe Mucchiello
Sent: Thu 3/6/2008 2:39 PM
To: Geeklog Development
Subject: Re: [geeklog-devel] Site breaks when there is one or more upcoming event?
 
At 01:00 PM 3/6/2008, Blank, Jessica wrote:

>However, when I call it like this:
>func('MyX', 'MyY', NULL);

Well of course that fails. NULL is not an array. Nor it NULL "not a 
parameter".  The second test case is supposed to be

func('MyX','MyY');

Thus the bug is not in COM_createLink but in the phpblock_calendar. 
This (around line 247 of plugins/calendar/functions.inc from CVS 
about a week old):

     if( $todaysEvent ) {
         $attr = array('class' => $todaysClassName);
     }

     $newevent = COM_createLink(
         stripslashes( $theEvent['title'] ),
         $newevent_url,
         $attr
         );

The $attr needs initialization. I didn't use an else under the 
assumption that in the future there could be other conditions that 
add attributes independent of $todaysEvent:

     $attr = array();
     if ($todaysEvent) {
         $attr['class'] =>$todaysClassName;
     }

----
Joe Mucchiello
Throwing Dice Games
http://www.throwingdice.com 

_______________________________________________
geeklog-devel mailing list
geeklog-devel at lists.geeklog.net
http://eight.pairlist.net/mailman/listinfo/geeklog-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist8.pair.net/pipermail/geeklog-devel/attachments/20080306/c171b2bf/attachment.html>


More information about the geeklog-devel mailing list