From f4427dcd77cf89e42406e26a668fe5b999c544d5 Mon Sep 17 00:00:00 2001 From: Tykayn Date: Sat, 1 May 2021 23:30:06 +0200 Subject: [PATCH] fix count for no sub time slice on day --- src/Entity/Poll.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Entity/Poll.php b/src/Entity/Poll.php index b891203..a99ea0f 100755 --- a/src/Entity/Poll.php +++ b/src/Entity/Poll.php @@ -295,6 +295,8 @@ class Poll { foreach ( $this->getChoices() as $choice ) { $boom = explode( ' >>> ', $choice->getName() ); + if(count($boom) ==2){ + if ( ! isset( $grouped_dates[ $boom[ 0 ] ] ) ) { @@ -307,6 +309,7 @@ class Poll { $grouped_dates[ $boom[ 0 ] ][ "choices" ][] = [ "choice_id" => $choice->getId(), "name" => $boom[ 1 ] ]; + } } } $scoreInfos = [