Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database: return empty collection when language does not exist on get… #266

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from

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.

None yet

2 participants