Skip to content

Commit 52a89ce

Browse files
committed
fix: handle unset "type" when upload participant list
1 parent 9b24d24 commit 52a89ce

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

app/Http/Controllers/ProjectController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,7 @@ public function importParticipantUpload(Request $request) {
592592
$messages [] = 'ERROR: student_id ไม่ถูกต้อง';
593593
break;
594594
}
595+
$row['type'] ??= null; // set to null if undefined
595596
if ($request->filled('project') and (empty($row['type']) or !in_array($row['type'], ['organizer', 'staff', 'attendee']))) {
596597
$messages [] = 'ERROR: type ไม่ถูกต้อง';
597598
break;

0 commit comments

Comments
 (0)