Skip to content

Commit

Permalink
feat: Removed useless new Shop() instantiation
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmolinacano committed Oct 9, 2024
1 parent d012d0e commit 72c4945
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Entity/DfTools.php
Original file line number Diff line number Diff line change
Expand Up @@ -1197,8 +1197,7 @@ public static function getCurrencyForLanguageFromRequest(\Language $lang)
public static function getModuleLink($path, $ssl = false)
{
$context = \Context::getContext();
$shop = new \Shop($context->shop->id);
$base = (($ssl && \Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://') . $shop->domain;
$base = (($ssl && \Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://') . $context->shop->domain;

return $base . _MODULE_DIR_ . basename(dirname(__FILE__)) . '/' . $path;
}
Expand Down

0 comments on commit 72c4945

Please sign in to comment.