[Tickets #5228] Re: Fix for Recurrence::hasRecurType

bugs at bugs.horde.org bugs at bugs.horde.org
Wed Apr 18 07:38:02 UTC 2007


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=5228
-----------------------------------------------------------------------
 Ticket             | 5228
 Updated By         | thomas.jarosch at intra2net.com
 Summary            | Fix for Recurrence::hasRecurType
 Queue              | Kronolith
 Version            | HEAD
 Type               | Bug
 State              | Feedback
 Priority           | 1. Low
 Owners             | Jan Schneider
-----------------------------------------------------------------------


thomas.jarosch at intra2net.com (2007-04-18 00:38) wrote:

Hello Jan,

> This doesn't make sense to me. We use constants for the recur type, 
> so a strict comparison works fine here.

I think the problem is related to the UI. If you change a recurrence, the
internal PHP type for the form input is "string". Please consider this
short code example:

<?php

define('HORDE_DATE_RECUR_NONE', 0);
$var = "0";

echo "hasRecurTypeOld: ".($var === HORDE_DATE_RECUR_NONE)."\n";
echo "hasRecurTypeNew: ".($var == HORDE_DATE_RECUR_NONE)."\n";




More information about the bugs mailing list