diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index ec956bccc..2c1ad067a 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -7,6 +7,7 @@ - fix: Trouble with Search Users (perlDreamer Consulting, LLC) http://www.plainblack.com/bugs/tracker/trouble-with-search-users - fix: Fixed an unhandled exception in Workflow/Activity/PurgeOldAssetRevisions.pm + - Added better error handling for asset instanciation in version tags. 7.3.14 diff --git a/lib/WebGUI/VersionTag.pm b/lib/WebGUI/VersionTag.pm index 440329a7e..bbab4d609 100644 --- a/lib/WebGUI/VersionTag.pm +++ b/lib/WebGUI/VersionTag.pm @@ -191,7 +191,12 @@ sub getAssets { } my $sth = $self->session->db->read("select asset.assetId,asset.className,assetData.revisionDate from assetData left join asset on asset.assetId=assetData.assetId where assetData.tagId=? ".$pending." order by ".$sort." ".$direction, [$self->getId]); while (my ($id,$class,$version) = $sth->array) { - push(@assets, WebGUI::Asset->new($self->session,$id,$class,$version)); + my $asset = WebGUI::Asset->new($self->session,$id,$class,$version); + unless (defined $asset) { + $self->session->errorHandler->error("Asset $id $class $version could not be instanciated by version tag ".$self->getId.". Perhaps it is corrupt."); + next; + } + push(@assets, $asset); } return \@assets; }