[dev] Kronolith bug in lib/Driver/sql.php

Chuck Hagenbuch chuck@horde.org
Mon, 16 Sep 2002 09:57:32 -0400


Quoting "David U." <davidu@everydns.net>:

> What happens is that when getEventObject is called with no $eventID it
> should make a new one however the line above converts a null into a 0
> this "giving it a value" and thinking it should return an event instead of
> creating a new one.

Fixed in CVS.

> but I'm sure there's a better way. Why is it being casted to an int?
> Isn't it an int already?

Not necessarily. It's called defensive programming.

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"After a few minutes the most aromatic and nice smelling Italian coffee 
 will come out of the exhaustpipe." - Our stove-top espresso pot