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)
287
287
288
288
$ _identifier = trim ($ request ->getPathInfo (), '/ ' );
289
289
$ 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 )) {
291
291
return null ;
292
292
}
293
293
Original file line number Diff line number Diff line change @@ -103,10 +103,8 @@ public function resolve($path)
103
103
if (!isset ($ pathInfo [2 ]) || in_array ($ pathInfo [2 ], ['index ' , 'feed ' ])) {
104
104
return ['id ' => 1 , 'type ' => Url::CONTROLLER_RSS ];
105
105
}
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 ];
110
108
} elseif ($ pathInfo [1 ] == $ this ->url ->getRoute (Url::CONTROLLER_AUTHOR )
111
109
&& !empty ($ pathInfo [2 ])
112
110
&& ($ authorId = $ this ->_getAuthorId ($ pathInfo [2 ]))
You can’t perform that action at this time.
0 commit comments