From 6701a10491997698348d9384596de0a797efabd4 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Fri, 6 Feb 2009 04:49:57 +0000 Subject: [PATCH] fixed a bug when a matrix listing didn't have a forum attached --- docs/upgrades/upgrade_7.5.40-7.6.10.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/upgrades/upgrade_7.5.40-7.6.10.pl b/docs/upgrades/upgrade_7.5.40-7.6.10.pl index 08900c63a..6d35a8bf1 100644 --- a/docs/upgrades/upgrade_7.5.40-7.6.10.pl +++ b/docs/upgrades/upgrade_7.5.40-7.6.10.pl @@ -354,6 +354,7 @@ sub upgradeMatrix { # migrate comments if($listing->{forumId}){ my $forum = WebGUI::Asset::Wobject::Collaboration->new($session, $listing->{forumId}); + if ( defined $forum ) { my @comments = @{ $forum->getLineage(['descendants'], { includeOnlyClasses => ["WebGUI::Asset::Post", "WebGUI::Asset::Post::Thread"], returnObjects => 1, @@ -367,6 +368,7 @@ sub upgradeMatrix { $newMatrixListing->addComment($content,0,$ownerUser); } } + } } } $db->write("drop table Matrix_listing");