Skip to content

Commit 698875a

Browse files
author
Nikita Chubukov
committed
MAGETWO-91531: Some products use Categories Path for Product URLs
- Fix of Static test
1 parent f47347f commit 698875a

File tree

1 file changed

+2
-11
lines changed
  • app/code/Magento/Catalog/Model/Product

1 file changed

+2
-11
lines changed

app/code/Magento/Catalog/Model/Product/Url.php

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,6 @@ public function __construct(
7979
\Magento\Framework\App\ObjectManager::getInstance()->get(ScopeConfigInterface::class);
8080
}
8181

82-
/**
83-
* Retrieve URL Instance
84-
*
85-
* @return \Magento\Framework\UrlInterface
86-
*/
87-
private function getUrlInstance()
88-
{
89-
return $this->urlFactory->create();
90-
}
91-
9282
/**
9383
* Retrieve URL in current store
9484
*
@@ -213,6 +203,7 @@ public function getUrl(\Magento\Catalog\Model\Product $product, $params = [])
213203
$routeParams['_query'] = [];
214204
}
215205

216-
return $this->getUrlInstance()->setScope($storeId)->getUrl($routePath, $routeParams);
206+
$url = $this->urlFactory->create()->setScope($storeId);
207+
return $url->getUrl($routePath, $routeParams);
217208
}
218209
}

0 commit comments

Comments
 (0)