File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -287,7 +287,7 @@ public function match(\Magento\Framework\App\RequestInterface $request)
287287
288288 $ _identifier = trim ($ request ->getPathInfo (), '/ ' );
289289 $ blogPage = $ this ->urlResolver ->resolve ($ _identifier );
290- if (!$ blogPage || empty ($ blogPage ['type ' ]) || empty ($ blogPage ['id ' ])) {
290+ if (!$ blogPage || empty ($ blogPage ['type ' ]) || ( empty ($ blogPage ['id ' ]) && $ blogPage [ ' type ' ] != Url:: CONTROLLER_SEARCH )) {
291291 return null ;
292292 }
293293
Original file line number Diff line number Diff line change @@ -103,10 +103,8 @@ public function resolve($path)
103103 if (!isset ($ pathInfo [2 ]) || in_array ($ pathInfo [2 ], ['index ' , 'feed ' ])) {
104104 return ['id ' => 1 , 'type ' => Url::CONTROLLER_RSS ];
105105 }
106- } elseif ($ pathInfo [1 ] == $ this ->url ->getRoute (Url::CONTROLLER_SEARCH )
107- && !empty ($ pathInfo [2 ])
108- ) {
109- return ['id ' => $ pathInfo [2 ], 'type ' => Url::CONTROLLER_SEARCH ];
106+ } elseif ($ pathInfo [1 ] == $ this ->url ->getRoute (Url::CONTROLLER_SEARCH )) {
107+ return ['id ' => empty ($ pathInfo [2 ]) ? '' : $ pathInfo [2 ], 'type ' => Url::CONTROLLER_SEARCH ];
110108 } elseif ($ pathInfo [1 ] == $ this ->url ->getRoute (Url::CONTROLLER_AUTHOR )
111109 && !empty ($ pathInfo [2 ])
112110 && ($ authorId = $ this ->_getAuthorId ($ pathInfo [2 ]))
You can’t perform that action at this time.
0 commit comments