diff --git a/bundle/Core/Helper/ImportUrlsHelper.php b/bundle/Core/Helper/ImportUrlsHelper.php index e67760f..8ee93c1 100644 --- a/bundle/Core/Helper/ImportUrlsHelper.php +++ b/bundle/Core/Helper/ImportUrlsHelper.php @@ -161,15 +161,16 @@ public function importUrlRedirection(string $filePath): array public function checkUrlDestinationExist(string $destination): bool { - $urlExists = false; - try { - $urlExists = $this->urlWildCardService->translate($destination); + if($$this->urlWildCardService->translate($destination) instanceof URLWildcardTranslationResult) { + return true; + } + } catch (\Exception $e) { $this->logger->log(LogLevel::ERROR, $e->getMessage()); } - return $urlExists; + return false; } public function saveUrls(string $filePath, string $source, string $destination): array