Skip to content

Commit c107794

Browse files
author
Oleksii Korshenko
authored
Merge pull request #231 from magento-fearless-kiwis/FearlessKiwis-MAGETWO-55229-Problem-while-upgrading-210
[Fearless Kiwis] MAGETWO-55229: Problem while upgrading to 2.1.0
2 parents bcdd65f + 80a7a65 commit c107794

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

app/code/Magento/Cms/Setup/UpgradeData.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,11 @@ public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface
235235
</div>
236236
EOD;
237237
$privacyAndCookiePolicyPage = $this->createPage()->load(self::PRIVACY_COOKIE_PAGE_ID);
238-
$privacyAndCookiePolicyPage->setContent($newPageContent);
239-
$privacyAndCookiePolicyPage->save();
238+
$privacyAndCookiePolicyPageId = $privacyAndCookiePolicyPage->getId();
239+
if ($privacyAndCookiePolicyPageId) {
240+
$privacyAndCookiePolicyPage->setContent($newPageContent);
241+
$privacyAndCookiePolicyPage->save();
242+
}
240243
}
241244
$setup->endSetup();
242245
}

0 commit comments

Comments
 (0)