Skip to content

Commit efb25c6

Browse files
BastianLedererIcinganilmerg
authored andcommitted
Only validate $options when calculating the first handoff
Validating the entire form also validates it's CSRF element which an invalid CSRF token stacktrace.
1 parent c6c2650 commit efb25c6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

application/forms/RotationConfigForm.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,8 +1240,8 @@ function ($value, $validator) use ($earliestHandoff, $firstHandoff, $latestHando
12401240
$this->addHtml(new HtmlElement(
12411241
'p',
12421242
Attributes::create(['id' => 'first-handoff-description']),
1243-
DeferredText::create(function () {
1244-
if (! $this->isValid()) {
1243+
DeferredText::create(function () use ($options) {
1244+
if (! $options->isValid()) {
12451245
return '';
12461246
}
12471247

@@ -1266,8 +1266,8 @@ function ($value, $validator) use ($earliestHandoff, $firstHandoff, $latestHando
12661266
}
12671267
}),
12681268
new HtmlElement('br'),
1269-
$this->displayTimezone !== $this->scheduleTimezone ? DeferredText::create(function () {
1270-
if (! $this->isValid()) {
1269+
$this->displayTimezone !== $this->scheduleTimezone ? DeferredText::create(function () use ($options) {
1270+
if (! $options->isValid()) {
12711271
return '';
12721272
}
12731273

0 commit comments

Comments
 (0)