if $this->localeManager->getActiveCodes(); is invalid it returns nothing and break the next foreach. I saw it with my spec and fixed it.