Skip to content

Commit ad6f834

Browse files
committed
MC-40538: When entering example.com/0 into browser the homepage is shown (example.com)
1 parent 1a843af commit ad6f834

File tree

1 file changed

+2
-2
lines changed
  • lib/internal/Magento/Framework/App/Router

1 file changed

+2
-2
lines changed

lib/internal/Magento/Framework/App/Router/Base.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ protected function matchModuleFrontName(\Magento\Framework\App\RequestInterface
202202
// get module name
203203
if ($request->getModuleName()) {
204204
$moduleFrontName = $request->getModuleName();
205-
} elseif (strlen($param)) {
205+
} elseif (strlen((string) $param)) {
206206
$moduleFrontName = $param;
207207
} else {
208208
$moduleFrontName = $this->_defaultPath->getPart('module');
@@ -271,7 +271,7 @@ protected function getNotFoundAction($currentModuleName)
271271
protected function matchAction(\Magento\Framework\App\RequestInterface $request, array $params)
272272
{
273273
$moduleFrontName = $this->matchModuleFrontName($request, $params['moduleFrontName']);
274-
if (!strlen($moduleFrontName)) {
274+
if (!strlen((string) $moduleFrontName)) {
275275
return null;
276276
}
277277

0 commit comments

Comments
 (0)