I get this error ho to solve it ?
{
$store = $this->storeManager->getStore($storeId);
if (!isset($variables['store'])) {
$variables['store'] = $store;
}
if (!isset($variables['store']['frontend_name'])) {
**$variables['store']['frontend_name'] = $store->getFrontendName();**
}
if (!isset($variables['logo_url'])) {
$variables['logo_url'] = $this->getLogoUrl($storeId);
}
$variables['store']['frontend_name'] = $store->getFrontendName();
error in this line if I gives any idea.
$variables
population flow, but based on your code you try to setstore
property as object\Magento\Store\Api\Data\StoreInterface
and nobody know what might be set before. After you try to change this object as array access. I suggest to check what kind of data you have instore
property before try to update new one property to it. Scalar variables are those containing an int, float, string or bool. Based on error looks like you have some another value asstore
than store object.