Skip to content

Conversation

@tomderoo
Copy link

Database: return empty collection when language does not exist on getSingleTranslationsFor a given language, to avoid operation on null.

Among other things, this avoids errors through third-party packages that call translations during artisan migrate and before the actual laravel-translation migrations have run - else we experience a fatal error that effectively prevents migration and causes all kinds of trouble on automated deployment systems.

This particular error came to light when attempting to set the driver to database on an existing Laravel project that included rinvex/countries and then running migrations.

…SingleTranslationsFor a given language, to avoid operation on null
@CrazyFreeMan
Copy link

Good! Need this fix, many errors generate this package :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants