Skip to content

Commit

Permalink
PHPstan fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nfourtythree committed Nov 26, 2024
1 parent 16100ff commit 7cea0eb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/controllers/BaseStoreManagementController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

use Craft;
use craft\commerce\Plugin;
use craft\web\UrlManager;
use yii\base\InvalidConfigException;
use yii\web\Response as YiiResponse;

Expand Down Expand Up @@ -42,7 +43,9 @@ public function renderTemplate(string $template, array $variables = [], ?string
$variables['storeSettingsNav'] = $this->getStoreSettingsNav();

if (!isset($variables['storeHandle'])) {
$routeParams = Craft::$app->getUrlManager()->getRouteParams();
/** @var UrlManager $urlManager */
$urlManager = Craft::$app->getUrlManager();
$routeParams = $urlManager->getRouteParams();

// Make sure store handle is always passed to the template
if (isset($routeParams['storeHandle'])) {
Expand Down

0 comments on commit 7cea0eb

Please sign in to comment.