Skip to content

Memory leak due to native error (from non secure uri) #3

Closed
@thomas-kl1

Description

@thomas-kl1

\Magento\Store\Model\Store::isCurrentlySecure

$secureBaseUrl = $this->_config->getValue(self::XML_PATH_SECURE_BASE_URL, ScopeInterface::SCOPE_STORE);
$secureFrontend = $this->_config->getValue(self::XML_PATH_SECURE_IN_FRONTEND, ScopeInterface::SCOPE_STORE);

This methods tries to resolve the configuration from the current active store instead of the internal state ID of the object.
Passing the own object ID fix it:

$secureBaseUrl = $this->_config->getValue(self::XML_PATH_SECURE_BASE_URL, ScopeInterface::SCOPE_STORE, $this->getId());
$secureFrontend = $this->_config->getValue(self::XML_PATH_SECURE_IN_FRONTEND, ScopeInterface::SCOPE_STORE, $this->getId());

Because the scope ID is not passed by, Magento core try to resolve the current store ID, which is already what the system is currently trying to achieve.

magento/magento2#38717

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions