diff --git a/application/controllers/MigrateController.php b/application/controllers/MigrateController.php index 0820fac45..cdc71d8a5 100644 --- a/application/controllers/MigrateController.php +++ b/application/controllers/MigrateController.php @@ -107,8 +107,13 @@ public function searchUrlAction() foreach ($urls as $urlString) { $url = Url::fromPath($urlString); $filter = QueryString::parse($url->getQueryString()); - $filter = $traverseFilter($filter) ?? $filter; - $result[] = rawurldecode($url->setQueryString(QueryString::render($filter))->getAbsoluteUrl()); + + $newFilter = $traverseFilter($filter); + if ($newFilter !== null) { + $result[] = rawurldecode($url->setQueryString(QueryString::render($newFilter))->getAbsoluteUrl()); + } else { + $result[] = $url->getAbsoluteUrl(); + } } $response = $this->getResponse()->json();