From ef5fd34577700d514c82ec9b5a579fad0b99efad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Fri, 14 Dec 2007 09:24:08 +0000 Subject: #189025 by AjK: fix two small E_ALL bugs in poll.module --- modules/poll/poll.module | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/poll') 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 != '') { -- cgit v1.2.3