fix count for no sub time slice on day

This commit is contained in:
Tykayn 2021-05-01 23:30:06 +02:00 committed by tykayn
parent 60207dc361
commit f4427dcd77
1 changed files with 3 additions and 0 deletions

View File

@ -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 = [