Fix bug when someone hasn't volunteered for any days
This commit is contained in:
parent
d6a78aa59d
commit
4e1db1575a
@ -45,6 +45,9 @@
|
||||
$daystrs = $database->select("adults", "days");
|
||||
$days = ["Tu" => 0, "We" => 0, "Th" => 0, "Fr" => 0];
|
||||
foreach ($daystrs as $str) {
|
||||
if ($str == "") {
|
||||
continue;
|
||||
}
|
||||
$arr = str_split($str, 2);
|
||||
foreach ($arr as $day) {
|
||||
$days[$day] += 1;
|
||||
@ -68,6 +71,9 @@
|
||||
$daystrs = $database->select("youth", "days");
|
||||
$days = ["Tu" => 0, "We" => 0, "Th" => 0, "Fr" => 0];
|
||||
foreach ($daystrs as $str) {
|
||||
if ($str == "") {
|
||||
continue;
|
||||
}
|
||||
$arr = str_split($str, 2);
|
||||
foreach ($arr as $day) {
|
||||
$days[$day] += 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user