parse.php: HOW THE HELL DID THAT WORK EVER

This commit is contained in:
Vasil Kolev 2022-09-29 15:21:15 +03:00 committed by Ivaylo Markov
parent 2e1323bb6a
commit c5d9daa758
1 changed files with 2 additions and 4 deletions

View File

@ -122,8 +122,7 @@ function parseData($config, $data) {
$events[$hall_id] = $hall_data; $events[$hall_id] = $hall_data;
} }
// Remove halls with no events after filtering // Remove halls with no events after filtering
$count = count($events); foreach ($events as $i => $val) {
for ($i = 0; $i < $count; ++$i) {
$hasEvents = false; $hasEvents = false;
foreach ($events[$i] as $event_info) { foreach ($events[$i] as $event_info) {
if (!is_null($event_info)) { if (!is_null($event_info)) {
@ -141,8 +140,7 @@ function parseData($config, $data) {
$events = array_map(null, ...$events); $events = array_map(null, ...$events);
// Filter empty slots // Filter empty slots
$count = count($events); foreach($events as $i => $val) {
for ($i = 0; $i < $count; ++$i) {
$hall_count = count($events[$i]); $hall_count = count($events[$i]);
$hasEvents = false; $hasEvents = false;