-
Notifications
You must be signed in to change notification settings - Fork 265
Open
Labels
Description
I was trying to refresh the cache via console and I received this error:
Argument 3 passed to Symfony\Bundle\FrameworkBundle\Translation\Translator::addResource() must be of the type string, null given, called in vendor/lexik/translation-bundle/Translation/Translator.php on line 44
After many attempts and some debug, I discovered the problem is caused by this query:
public function getAllDomainsByLocale()
{
return $this->createQueryBuilder('tu')
->select('te.locale, tu.domain')
->leftJoin('tu.translations', 'te')
->addGroupBy('te.locale')
->addGroupBy('tu.domain')
->getQuery()
->getArrayResult();
}
If the locale column contains any null value the error is triggered.
I don't know if the problem is the leftJoin (maybe should be a normal join) or addResource signature (maybe should accept also null values).
For now I removed the invalid translation_unit rows that caused the problem.
Reactions are currently unavailable