Commit ef5fd345 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#189025 by AjK: fix two small E_ALL bugs in poll.module

parent 86de9aad
......@@ -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 != '') {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment