diff options
author | David Rothstein <drothstein@gmail.com> | 2014-11-03 00:13:41 -0500 |
---|---|---|
committer | David Rothstein <drothstein@gmail.com> | 2014-11-03 00:13:41 -0500 |
commit | 0c8dc6ea062cd7595a7b6fbd02fb0f0294ccecef (patch) | |
tree | 2ed76eeaa6b567b880a039b5e4e7daecddac9305 /modules/poll/poll.module | |
parent | 010a9a54e74f7762e17591cb16881ae16637ef7d (diff) | |
download | brdo-0c8dc6ea062cd7595a7b6fbd02fb0f0294ccecef.tar.gz brdo-0c8dc6ea062cd7595a7b6fbd02fb0f0294ccecef.tar.bz2 |
Issue #1823906 by joshi.rohit100, amitgoyal, rahulbile | gargsuchi: Fixed Incorrect error message when poll is submitted with no option selected.
Diffstat (limited to 'modules/poll/poll.module')
-rw-r--r-- | modules/poll/poll.module | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/poll/poll.module b/modules/poll/poll.module index 4733fa238..c349829a2 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -720,7 +720,6 @@ function poll_view_voting($form, &$form_state, $node, $block = FALSE) { '#type' => 'radios', '#title' => t('Choices'), '#title_display' => 'invisible', - '#default_value' => -1, '#options' => $list, ); } @@ -748,7 +747,7 @@ function poll_view_voting($form, &$form_state, $node, $block = FALSE) { * Validation function for processing votes */ function poll_view_voting_validate($form, &$form_state) { - if ($form_state['values']['choice'] == -1) { + if (empty($form_state['values']['choice'])) { form_set_error( 'choice', t('Your vote could not be recorded because you did not select any of the choices.')); } } |