Skip to content

Commit 6c3a034

Browse files
committed
MAGETWO-54786: [GITHUB] Fixes invalid json objects in the order email templates #5116
2 parents a452400 + c107794 commit 6c3a034

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)