Skip Menu |

This queue is for tickets about the HTML-TurboForm CPAN distribution.

Report information
The Basics
Id: 90560
Status: new
Priority: 0/
Queue: HTML-TurboForm

People
Owner: Nobody in particular
Requestors: adrian [...] gt.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: get_value() for first element always returns empty string
Date: Wed, 20 Nov 2013 11:59:09 -0800
To: bug-HTML-TurboForm [...] rt.cpan.org
From: Adrian Yee <adrian [...] gt.net>
get_value() always returns an empty string if it's the first element in the element array. The following patch fixes this: --- HTML/TurboForm.pm.orig 2013-11-20 11:56:47.504626516 -0800 +++ HTML/TurboForm.pm 2013-11-20 11:56:51.980267223 -0800 @@ -521,12 +521,12 @@ my ($self, $name)=@_; my $result=''; - my $id=''; + my $id; try{ $id=$self->{element_index}->{$self->{prefix}.$name}->{index}; }; - $result=$self->{element}[$id]->get_value() if ($id); + $result=$self->{element}[$id]->get_value() if (defined $id); return $result; }