Fixes issue 4243: Ensure while loop in calendar module does not get stuck when no entries - #4244
Conversation
|
Thanks. But please base your pull requests against the |
abb9177 to
7a4901b
Compare
|
@KristjanESPERANTO I was able to switch this to |
|
@deBasMan21 I haven’t looked deeply into this yet, but could moving |
|
Yes, that was why it was counted inside the loop |
|
@khassel thanks for switching it to develop! @KristjanESPERANTO It should actually not really affect the limitDays functionality. It was counted inside the loop for n amount of days to collect calendar items from. However when a day has no items it would keep being stuck in the loop so no more items would be added. With this change the calendar items for the next n days would still be collected, but when there is a day without any items nothing would break. So when you set limitDays to 5 for example, it would still only collect the items from the next 5 days. I hope i explained this clear enough, but otherwise let me know ofcourse! |
KristjanESPERANTO
left a comment
There was a problem hiding this comment.
Thanks for the explanation, that makes sense to me now. Would you also like to add a regression test for this? No problem if not :)
|
I would love to, but currently im a bit short on time so maybe i will add one later on. |
|
I wrote a test. Without your fix, it fails; with your fix, it passes. So, as far as I'm concerned, the PR is ready to be merged :) |
Fixes: #4243