diff --git a/bin/console b/bin/console index 3202709639394..644ea6473c669 100755 --- a/bin/console +++ b/bin/console @@ -12,8 +12,7 @@ use Symfony\Component\Debug\Debug; set_time_limit(0); -require __DIR__.'/../vendor/autoload.php'; -require_once __DIR__.'/../autoload.php'; +require_once __DIR__ . '/../config/config.inc.php'; $input = new ArgvInput(); $env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev'); diff --git a/src/PrestaShopBundle/Translation/Loader/SqlTranslationLoader.php b/src/PrestaShopBundle/Translation/Loader/SqlTranslationLoader.php index 1eebe0fdbfd37..db9a4554663fa 100644 --- a/src/PrestaShopBundle/Translation/Loader/SqlTranslationLoader.php +++ b/src/PrestaShopBundle/Translation/Loader/SqlTranslationLoader.php @@ -28,11 +28,11 @@ namespace PrestaShopBundle\Translation\Loader; use Db; -use Exception; use PrestaShop\PrestaShop\Core\Addon\Theme\Theme; use Symfony\Component\Translation\Loader\LoaderInterface; use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\MessageCatalogueInterface; +use Symfony\Component\Translation\Exception\NotFoundResourceException; class SqlTranslationLoader implements LoaderInterface { @@ -71,7 +71,7 @@ public function load($resource, $locale, $domain = 'messages') } if (empty($localeResults[$locale])) { - throw new Exception(sprintf('Language not found in database: %s', $locale)); + throw new NotFoundResourceException(sprintf('Language not found in database: %s', $locale)); } $selectTranslationsQuery = '