Skip to content

Commit

Permalink
Merge pull request #488 from City-of-Helsinki/ASU-X-Applicant_checks
Browse files Browse the repository at this point in the history
Condition fix
  • Loading branch information
tvalimaa authored Nov 16, 2023
2 parents 784d814 + 7bc20df commit bbebf9c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,9 @@ public function validateForm(array &$form, FormStateInterface $form_state) {
}
}

$has_additional_applicant = (!empty($formValues['applicant'][0]['has_additional_applicant'])) ? $formValues['applicant'][0]['has_additional_applicant'] : NULL;
$has_additional_applicant = (!empty($formValues['applicant'][0]['has_additional_applicant'])) ? (bool) $formValues['applicant'][0]['has_additional_applicant'] : FALSE;

if ($has_additional_applicant && $has_additional_applicant) {
if ($has_additional_applicant) {
foreach ($formValues['applicant'][0] as $applicant_field => $applicant_value) {
if ($applicant_field == 'has_additional_applicant') {
continue;
Expand Down

0 comments on commit bbebf9c

Please sign in to comment.