Skip to content

Fix initializer for relationshipLocal configuration #186

@themightychris

Description

@themightychris

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions