diff --git a/docs/gotcha.txt b/docs/gotcha.txt index 0a71d000c..0f2b1314a 100644 --- a/docs/gotcha.txt +++ b/docs/gotcha.txt @@ -34,6 +34,10 @@ save you many hours of grief. Also, the Event List view of the calendar works a little different than it used to. + The upgrade script takes an unusually long time to migrate EventCalendar + wobjects to the new Calendar wobjects. We're looking into the cause but + don't kill your upgrade thinking its hung up, we promise it will finish. + 7.2.0 -------------------------------------------------------------------- * NOTE: if you tried to upgrade to 7.2.0 and it failed during the diff --git a/lib/WebGUI/AssetTrash.pm b/lib/WebGUI/AssetTrash.pm index 262425be5..c5c00008e 100644 --- a/lib/WebGUI/AssetTrash.pm +++ b/lib/WebGUI/AssetTrash.pm @@ -101,7 +101,9 @@ sub purge { my $kids = $self->getLineage(["children"],{returnObjects=>1, statesToInclude=>['published', 'clipboard', 'clipboard-limbo','trash','trash-limbo']}); foreach my $kid (@{$kids}) { - $kid->purge; + # Technically get lineage should never return an undefined object from getLineage when called like this, but it did so this saves the world from destruction. + (defined $kid) ? $kid->purge : + $self->session->errorHandler->warn("getLineage returned an undefined object in the AssetTrash->purge method. Unable to purge asset."); } $self->session->db->beginTransaction; foreach my $definition (@{$self->definition($self->session)}) {