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.5] Use the getAttributes method on insert #25349

Merged
merged 1 commit into from
Aug 27, 2018
Merged

[5.5] Use the getAttributes method on insert #25349

merged 1 commit into from
Aug 27, 2018

Conversation

ollieread
Copy link
Contributor

The performInsert() method grabs the attributes property directly without using getAttributes(). The performUpdate() method uses getAttributes().

As far as I can see, there are no reasons that this method can't be called on insert, because if the $attributes property is set and populated, getAttributes() returns the values.

This will force Eloquent to honour its own API and help anyone that overrides this method for any reason.

Update the performInsert method to use getAttributes instead of accessing the property directly.
@ollieread ollieread changed the title Use the getAttributes method on insert [5.5] Use the getAttributes method on insert Aug 27, 2018
@taylorotwell taylorotwell merged commit 61bdc1f into laravel:5.5 Aug 27, 2018
EspadaV8 pushed a commit to intellihr/framework that referenced this pull request Jan 28, 2021
Update the performInsert method to use getAttributes instead of accessing the property directly.
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