diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-12-14 09:24:08 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-12-14 09:24:08 +0000 |
commit | ef5fd34577700d514c82ec9b5a579fad0b99efad (patch) | |
tree | eeee17d71cb1fdb484d7ead20664c4f35c2fa074 /modules/poll | |
parent | 86de9aade3545c482a56b4241a6c48ea40b3563d (diff) | |
download | brdo-ef5fd34577700d514c82ec9b5a579fad0b99efad.tar.gz brdo-ef5fd34577700d514c82ec9b5a579fad0b99efad.tar.bz2 |
#189025 by AjK: fix two small E_ALL bugs in poll.module
Diffstat (limited to 'modules/poll')
-rw-r--r-- | modules/poll/poll.module | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/poll/poll.module b/modules/poll/poll.module index 1d1bc9174..f2d9e41a2 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -379,7 +379,7 @@ function poll_validate($node) { if ($choice['chtext'] != '') { $realchoices++; } - if ($choice['chvotes'] < 0) { + if (isset($choice['chvotes']) && $choice['chvotes'] < 0) { form_set_error("choice][$i][chvotes", t('Negative values are not allowed.')); } } @@ -457,7 +457,7 @@ function poll_update($node) { $i = 0; foreach ($node->choice as $choice) { - $chvotes = (int)$choice['chvotes']; + $chvotes = isset($choice['chvotes']) ? (int)$choice['chvotes'] : 0; $chtext = $choice['chtext']; if ($chtext != '') { |