Skip to content

Commit a5fedf6

Browse files
authored
Merge pull request #2101 from opensource-workshop/2.23.2
Merge v1.23.2 into 2
2 parents fa9e05d + 8b97bf2 commit a5fedf6

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

app/Plugins/User/Reservations/ReservationsPlugin.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@ public function saveBooking($request, $page_id, $frame_id, $booking_id = null)
828828
$validator_array['message']['rrule_byday_monthly'] = '曜日指定';
829829
} else {
830830
// 日付指定 BYMONTHDAY
831-
$validator_array['column']['rrule_bymonthday_monthly'] = ['required', 'numeric'];
831+
$validator_array['column']['rrule_bymonthday_monthly'] = ['required', 'numeric', 'min:1', 'max:31'];
832832
$validator_array['message']['rrule_bymonthday_monthly'] = '日付指定';
833833
}
834834

@@ -889,7 +889,13 @@ public function saveBooking($request, $page_id, $frame_id, $booking_id = null)
889889
$rrule_setting['BYDAY'] = $request->rrule_byday_monthly; // 曜日指定(月)
890890
} else {
891891
// 日付指定 BYMONTHDAY
892-
$rrule_setting['BYMONTHDAY'] = (int) $request->rrule_bymonthday_monthly; // 日付指定(月)
892+
// Invalid BYMONTHDAY value: 0 (valid values are 1 to 31 or -31 to -1)エラー対応. 0以下32以上は1にrruleを仮設定して、入力チェックでエラーとする
893+
$rrule_bymonthday_monthly = (int) $request->rrule_bymonthday_monthly;
894+
if ($rrule_bymonthday_monthly >= 1 && $rrule_bymonthday_monthly <= 31) {
895+
$rrule_setting['BYMONTHDAY'] = $rrule_bymonthday_monthly; // 日付指定(月)
896+
} else {
897+
$rrule_setting['BYMONTHDAY'] = 1;
898+
}
893899
}
894900

895901
} elseif ($request->rrule_freq == RruleFreq::YEARLY) {

config/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
|
1313
*/
1414

15-
'cc_version' => '2.23.1',
15+
'cc_version' => '2.23.2',
1616

1717
'show_cc_version' => true,
1818
];

0 commit comments

Comments
 (0)