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

[5.1] Fix Str::snake method for UTF-8 strings #12923

Merged
merged 1 commit into from
Mar 30, 2016
Merged

[5.1] Fix Str::snake method for UTF-8 strings #12923

merged 1 commit into from
Mar 30, 2016

Conversation

aykutfarsak
Copy link
Contributor

When i set locale to tr_TR.UTF-8, Str::snake() method can't convert an utf-8 string to snake case correctly because of strtolower. So in SQL queries, it causes query exceptions:

 Next Illuminate\Database\QueryException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dbname.Invites' doesn't exist (SQL: select * from `Invites` where ...

In this example, it is trying to get Laravel Eloquent model called Invite's data but it's table name converted to Invites instead of invites. When i set table name manually to model ($table property), it works.

NOTE: This issue occurs on PHP 7 setup.

Verified

This commit was signed with the committer’s verified signature.
Eomm Manuel Spigolon
@GrahamCampbell
Copy link
Member

thanks

@GrahamCampbell
Copy link
Member

Any chance we could have a test added here too please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants