Skip to content

Commit 047995e

Browse files
MC-37653: New/Edit Dynamic Block with Different User Role
1 parent 8aaa9e9 commit 047995e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/code/Magento/PageBuilder/Model/Stage/Preview.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use Magento\Framework\View\Design\Theme\ThemeProviderInterface;
1414
use Magento\Framework\View\DesignInterface;
1515
use Magento\Store\Model\App\Emulation;
16+
use Magento\Store\Model\ScopeInterface;
1617
use Magento\Store\Model\StoreManagerInterface;
1718

1819
/**
@@ -112,7 +113,7 @@ public function startPreviewMode($callback, $storeId = null)
112113
function () use ($callback) {
113114
$themeId = $this->scopeConfig->getValue(
114115
'design/theme/theme_id',
115-
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
116+
ScopeInterface::SCOPE_STORE
116117
);
117118
$theme = $this->themeProvider->getThemeById($themeId);
118119
$this->design->setDesignTheme($theme, $this->getPreviewArea());
@@ -150,12 +151,12 @@ private function getStoreId(): ?int
150151
$storeId = null;
151152
$store = $this->storeManager->getDefaultStoreView();
152153
if ($store) {
153-
$storeId = $store->getId();
154+
$storeId = (int) $store->getId();
154155
} else {
155156
$stores = $this->storeManager->getStores();
156157
if (count($stores)) {
157158
$store = array_shift($stores);
158-
$storeId = $store->getId();
159+
$storeId = (int) $store->getId();
159160
}
160161
}
161162

0 commit comments

Comments
 (0)