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

@ -5,6 +5,8 @@
- Fixed the test skeleton
- Fixed some bugs regarding Search relevance sorting (Len Kranendonk / www.ilance.nl)
- Added an option to override the session cookie name.
- Fix Asset.pm so that if no className is passed primeval Assets are not
returned.
7.0.4

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}) {