Compare int to string in AddReservationForm.php

Created on 22 April 2025, 3 days ago

Problem/Motivation

When we have an hourly booking with opening dates, I get an error "Please select start and end times within the opening hours." because during this test that compares an integer with a string.

In file AddReservationForm.php (l263))

          // Only slots that are in the requested starting day.
          $open_hours = array_filter($open_hours, function ($open_hour) use ($start_date) {
            return $open_hour['day'] === $start_date->format('w');
          });

Steps to reproduce

Just add cast.

🐛 Bug report
Status

Active

Version

11.1

Component

Code

Created by

🇫🇷France Ilyna

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024