0

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.

1
  • There is not clear whole $variables population flow, but based on your code you try to set store 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 in store 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 as store than store object. Jun 9, 2022 at 19:06

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.