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

Fix initializer for relationshipLocal configuration #186

Open
themightychris opened this issue May 8, 2019 · 0 comments
Open

Fix initializer for relationshipLocal configuration #186

themightychris opened this issue May 8, 2019 · 0 comments

Comments

@themightychris
Copy link
Member

The spot where the many-many relationship option relationshipLocal is supposed to be initialized suffers some copy-pasta duplicating relationshipForeign instead:

if (empty($options['relationshipForeign'])) {

It looks like as long as warnings are disabled, this mistake only results in the two uses of relationshipLocal being a no-op which are avoided if consumers of saving to many-many functionality only set already-configured link class instances

This bug is a good time to start building out ActiveRecord's core unit tests, merge a fix for this that includes a unit tests that goes from failing to passing

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

No branches or pull requests

1 participant