Fix a typo in the Template/Parser.pm code.

The SQL table patch for userSessionScratch won't apply if the table contains
duplicate entries in the rows that will be set as keys.  So the table is
emptied before the patch is applied.
This commit is contained in:
Colin Kuskie 2006-04-25 17:38:58 +00:00
parent 79806e417f
commit bc2f54e08c
3 changed files with 4 additions and 1 deletions

View file

@ -43,7 +43,7 @@ sub addSessionVars {
$vars->{"session.setting.anonymousRegistration"} = $self->session->setting->get("anonymousRegistration");
my $forms = $self->session->form->paramsHashRef();
foreach my $field (keys %$forms) {
if $forms->{$field} {
if ($forms->{$field}) {
$vars->{"session.form.".$field} =
(ref($forms->{$field}) eq 'ARRAY')
?$forms->{$field}[$forms->{$field}[-1]]