Skip to content

Commit

Permalink
Fix TypeError. See GitHub Issue #3675.
Browse files Browse the repository at this point in the history
  • Loading branch information
campbell-m committed May 22, 2024
1 parent ac23c54 commit 93b417a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web/edit_entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -1612,6 +1612,9 @@ function getbookingdate(int $t, bool $is_end=false) : array

while (false !== ($row = $res->next_row_keyed()))
{
// Cast the columns to their correct types
row_cast_columns($row, 'area');

// We don't want areas that have no enabled rooms because it doesn't make sense
// to try and select them for a booking.
if (empty($rooms[$row['id']]))
Expand All @@ -1629,7 +1632,7 @@ function getbookingdate(int $t, bool $is_end=false) : array
$row['resolution'] = 60;
}
// Generate some derived settings
$row['max_duration_qty'] = $row['max_duration_secs'];
$row['max_duration_qty'] = $row['max_duration_secs'];
toTimeString($row['max_duration_qty'], $row['max_duration_units']);
// Get the start and end of the booking day
if ($row['enable_periods'])
Expand Down
2 changes: 2 additions & 0 deletions web/mrbs_sql.inc
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,8 @@ function get_entry_by_id(int $id) : ?array
else
{
$result = $res->next_row_keyed();
// Cast the columns to their correct types
row_cast_columns($result, 'entry');
// Unpack the status bits
unpack_status($result);
}
Expand Down

0 comments on commit 93b417a

Please sign in to comment.