6.0.0-beta1
7/31/25

[#5228] Fix for Recurrence::hasRecurType
Summary Fix for Recurrence::hasRecurType
Queue Kronolith
Queue Version HEAD
Type Bug
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester thomas.jarosch (at) intra2net (dot) com
Created 04/09/2007 (6688 days ago)
Due
Updated 04/18/2007 (6679 days ago)
Assigned 04/17/2007 (6680 days ago)
Resolved 04/18/2007 (6679 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
04/18/2007 08:17:49 AM Jan Schneider Comment #5
State ⇒ Resolved
Reply to this comment
Ah right, we use them in form fields. Since casting form values to 
integers has the same effect as non-strict comparisons, I applied your 
patch, thanks.
04/18/2007 07:38:02 AM thomas (dot) jarosch (at) intra2net (dot) com Comment #4 Reply to this comment
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";


04/17/2007 10:58:26 PM Jan Schneider Comment #3
State ⇒ Feedback
Reply to this comment
This doesn't make sense to me. We use constants for the recur type, so 
a strict comparison works fine here.
04/09/2007 05:59:52 PM Chuck Hagenbuch Comment #2
State ⇒ Assigned
Assigned to Jan Schneider
Reply to this comment
Giving to Jan since he's done all of the recent recurrence work.
04/09/2007 10:05:22 AM thomas (dot) jarosch (at) intra2net (dot) com Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Fix for Recurrence::hasRecurType
Queue ⇒ Kronolith
New Attachment: kronolith-recurrence-fix-hasRecurType.patch Download
State ⇒ Unconfirmed
Reply to this comment
Hello,



attached patch fixes a logic bug in hasRecurType(). Without the patch,

the recurs() function of an event always returns true.



Best regards,

Thomas Jarosch


Saved Queries