Bug: Why are time slots marked free if service duration >= 20*time base

I have time base in General settings set to 15 minutes.
I use the AddOn Durations with

Time slot calculus method set to
* Minimum time based appointment duration calculus (legacy)
Boundaries detection set to
* Exact period matching (legacy)

The plugin lets me book services on the front end, that have a duration of more than 20*time base (20*15=300), on time slots that lead to overlaps:

There are no "not available" time slots if service time > 300.
If service time = 285 then I get the "not available" time slots before an other booked time slot.

An example to clarify: lets say we have an appointment booked at 18:00.

If I select a service lasting 285 minutes on the frontend. I can book 13:15 but not 13:30 to 17:45 - well well :wink:.

BUT if I select a service lasting 300 minutes I can book all time slots (13:15 to 17:45) which is not valid and leads to customer fights :wink:.

I found the php code causing this bug in appointments.php line 2541 (

if ( $step < 20 ) {} // Let's not exaggerate !

Disabling the if alltogehter or setting the test limit to something much bigger than 20 solves the issue.

Could you please update the code so I don't run into troubles on the next update?

Thank you very much for your help!