lexik / LexikTranslationBundle

This Symfony bundle allow to import translation files content into the database and provide a GUI to edit translations.
MIT License
422 stars 259 forks source link

Notice: Undefined index: charset. #303

Open eugenekurasov opened 6 years ago

eugenekurasov commented 6 years ago

When use master-slave on doctrine. I got exception in Lexik\Bundle\TranslationBundle\Storage\Listener\DoctrineORMListener

        $params = $eventArgs->getEntityManager()->getConnection()->getParams();

        if ('utf8mb4' !== strtolower($params['charset'])) {
            return;
        }

If master-slave is enabled 'charset' move to $params['master']['charset']

composer show | grep lexik

lexik/translation-bundle                 v4.0.5
eugenekurasov commented 6 years ago

I have found fixed on master. On this PR #298 this issue has been solved.

@spike31 when it's fix will be include to 4.x version?