From 846b957a789f605402adcfb1deff167d93429fd9 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Fri, 16 Oct 2009 16:53:53 -0700 Subject: [PATCH] Fix upgrade error that was hit on 7.7.21 to 7.7.22. Fixes bug #11146 --- docs/changelog/7.x.x.txt | 1 + docs/upgrades/upgrade_7.8.1-7.8.2.pl | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index a7b86a878..f1434f774 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -22,6 +22,7 @@ - fixed #10888: Issues with adding points to Maps - fixed #10993: Editor drops last letter if s - fixed #11139: referencing an item in the clipboard + - fixed #11146: Upgrade Error 7.7.21 to 7.7.22 7.8.1 - mark $session->datetime->time as deprecated and remove its use from core code diff --git a/docs/upgrades/upgrade_7.8.1-7.8.2.pl b/docs/upgrades/upgrade_7.8.1-7.8.2.pl index 348e20cee..ccb57d8c6 100644 --- a/docs/upgrades/upgrade_7.8.1-7.8.2.pl +++ b/docs/upgrades/upgrade_7.8.1-7.8.2.pl @@ -95,7 +95,8 @@ sub correctWikiAttachmentPermissions { PAGE: while (my $wikiPage = $pageIterator->()) { my $wiki = $wikiPage->getWiki; next PAGE unless $wiki && $wiki->get('allowAttachments') && $wikiPage->getChildCount; - foreach my $attachment (@{ $wikiPage->getLineage(['children'])}) { + ATTACHMENT: foreach my $attachment (@{ $wikiPage->getLineage(['children'], { returnObjects => 1, })}) { + next ATTACHMENT unless $attachment; $attachment->update({ groupIdEdit => $wiki->get('groupToEditPages') }); } }