Prevent Form/File from returning links in getValueAsHtml if there's
no real value in the storage element to return.
This commit is contained in:
parent
cdedf8c6b5
commit
472580dd45
2 changed files with 2 additions and 0 deletions
|
|
@ -222,6 +222,7 @@ sub getValueAsHtml {
|
|||
return '' unless $value;
|
||||
my $location = WebGUI::Storage->get($self->session,$value);
|
||||
my $file = shift @{ $location->getFiles };
|
||||
return '' unless $file;
|
||||
my $fileValue = sprintf qq|<img src="%s" /> <a href="%s">%s</a>|, $location->getFileIconUrl($file), $location->getUrl($file), $file;
|
||||
return $fileValue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue