diff --git a/core/lib/Thelia/Model/Tools/ModelCriteriaTools.php b/core/lib/Thelia/Model/Tools/ModelCriteriaTools.php index 5e5dae010..c7426ef71 100755 --- a/core/lib/Thelia/Model/Tools/ModelCriteriaTools.php +++ b/core/lib/Thelia/Model/Tools/ModelCriteriaTools.php @@ -110,7 +110,7 @@ class ModelCriteriaTools { // If a lang has been requested, find the related Lang object, and get the locale if ($requestedLangId !== null) { - $localeSearch = LangQuery::create()->findOneById($requestedLangId); + $localeSearch = LangQuery::create()->findPk($requestedLangId); if ($localeSearch === null) { throw new \InvalidArgumentException(sprintf('Incorrect lang argument given : lang ID %d not found', $requestedLangId));