Skip to content

Compare products invalid method urlDecode #807

@jamescowie

Description

@jamescowie

When trying to compare products the following error is thrown:

PHP Fatal error:  Call to undefined method Magento\\Core\\Helper\\Data::urlDecode() in /vagrant/app/code/Magento/Catalog/Controller/Product/Compare/Index.php on line 22,

Looking at Magento\Core\Helper\Data There is no method urlDecode and I cant seem to find any reference to this method in the code base.

By adding the below from Magento1 partially resolves the issue:

/**
     *  base64_dencode() for URLs dencoding
     *
     *  @param    string $url
     *  @return   string
     */
    public function urlDecode($url)
    {
        $url = base64_decode(strtr($url, '-_,', '+/='));
        return $url;
    }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions