check field add poll

This commit is contained in:
Tykayn 2021-04-30 23:49:02 +02:00 committed by tykayn
parent ff0da0cf49
commit 60207dc361
1 changed files with 4 additions and 1 deletions

View File

@ -250,7 +250,10 @@ class PollController extends EmailsController {
// emails
$newpoll->setMailOnComment( true );
if(isset($data['isOwnerNotifiedByEmailOnNewVote'])){
$newpoll->setMailOnVote( $data['isOwnerNotifiedByEmailOnNewVote'] );
}
$newpoll->setDescription( $data['description'] );
$newpoll->setHideResults( false );
// possible answers
@ -278,7 +281,7 @@ class PollController extends EmailsController {
elseif ( $data[ 'kind' ] == 'date' ) {
$choices = $data[ 'dateChoices' ];
if ( $data[ 'hasSeveralHours' ] == true ) {
if ( isset($data[ 'hasSeveralHours' ]) && $data[ 'hasSeveralHours' ] == true ) {
// different hours spans make more choices
foreach ( $choices as $c ) {