fix Asset.pm so that it returns undef if no valid Asset className is passed

This commit is contained in:
Colin Kuskie 2006-08-08 17:20:22 +00:00
parent a7fa4c6a92
commit 6a88fa5ca2
2 changed files with 3 additions and 0 deletions

View file

@ -1406,6 +1406,7 @@ sub new {
}
$class = $className;
}
return undef if $class eq 'WebGUI::Asset';
my $cache = WebGUI::Cache->new($session, ["asset",$assetId,$revisionDate]);
my $properties = $cache->get;
if (exists $properties->{assetId}) {