Priority: Normal
Current State: Closed
Released In: n/a
Target Release: minor
Attach.pm fails with the following error:
Use of uninitialized value in substitution iterator at /var/www/SVN/foswiki/core/lib/Foswiki/UI/Attach.pm line 91.
at /usr/lib/perl5/vendor_perl/5.8.8/CGI/Carp.pm line 356
CGI::Carp::realdie('Use of uninitialized value in substitution iterator at /var/w...') called at /usr/lib/perl5/vendor_perl/5.8.8/CGI/Carp.pm line 437
CGI::Carp::die('Use of uninitialized value in substitution iterator at /var/w...') called at /var/www/SVN/foswiki/core/lib/Foswiki.pm line 159
Foswiki::__ANON__('Use of uninitialized value in substitution iterator at /var/w...') called at /var/www/SVN/foswiki/core/lib/Foswiki/UI/Attach.pm line 91
Foswiki::UI::Attach::attach('Foswiki=HASH(0xa691a6c)') called at /var/www/SVN/foswiki/core/lib/Foswiki/UI.pm line 313
Foswiki::UI::__ANON__() called at /usr/lib/perl5/vendor_perl/5.8.8/Error.pm line 415
eval {...} called at /usr/lib/perl5/vendor_perl/5.8.8/Error.pm line 407
Error::subs::try('CODE(0xa5df54c)', 'HASH(0xace08a4)') called at /var/www/SVN/foswiki/core/lib/Foswiki/UI.pm line 402
Foswiki::UI::_execute('Foswiki::Request=HASH(0xa6914d8)', 'CODE(0xa698404)', 'attach', 1) called at /var/www/SVN/foswiki/core/lib/Foswiki/UI.pm line 287
Foswiki::UI::handleRequest('Foswiki::Request=HASH(0xa6914d8)') called at /var/www/SVN/foswiki/core/lib/Foswiki/Engine/CGI.pm line 29
Foswiki::Engine::CGI::run('Foswiki::Engine::CGI=HASH(0xa5633a0)') called at attach line 45.
Simple fix for Attach.pm, but wondering if the metadata should all be validated somewhere earlier instead of verifying everywhere when used?
$tmpl =~ s/%FILEPATH%/$args->{path}/g;
change to:
my $filePath = $args->{path} || $fileName;
$tmpl =~ s/%FILEPATH%/$filePath/g;
Checking in fix for now.
Metadata appears to be validated - This fix appeared to resolve the issue. Closing.