More warnings cleanup.
Patch by kareila.
diffs (27 lines):
diff -r 4756db2b8254 -r 902e293aa620 cgi-bin/LJ/Poll.pm
--- a/cgi-bin/LJ/Poll.pm Wed Nov 03 10:58:54 2010 +0800
+++ b/cgi-bin/LJ/Poll.pm Wed Nov 03 13:18:06 2010 +0800
@@ -1402,8 +1402,10 @@ sub process_submission {
if (length($val) > 0) { # if the user answered to this question
my @num_opts = split( /,/, $val );
my $num_opts = scalar @num_opts; # returns the number of
options they answered
-
+
my ($checkmin, $checkmax) = split(m!/!, $q->opts);
+ $checkmin ||= 0;
+ $checkmax ||= 255;
if($num_opts < $checkmin) {
$$error = LJ::Lang::ml('poll.error.checkfewoptions',
{'question' => $qid, 'options' => $checkmin});
diff -r 4756db2b8254 -r 902e293aa620 cgi-bin/LJ/Poll/Question.pm
--- a/cgi-bin/LJ/Poll/Question.pm Wed Nov 03 10:58:54 2010 +0800
+++ b/cgi-bin/LJ/Poll/Question.pm Wed Nov 03 13:18:06 2010 +0800
@@ -202,7 +202,7 @@ sub opts {
sub opts {
my $self = shift;
$self->_load;
- return $self->{opts};
+ return $self->{opts} || '';
}
*text = \&qtext;
sub qtext {
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog