Skip to content

Commit eec4deb

Browse files
MTA-3483: Create pull request and deliver extended functional tests to mainline
2 parents f30d10b + c107794 commit eec4deb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
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)