orm icon indicating copy to clipboard operation
orm copied to clipboard

Trying to access array offset on value of type null in BasicEntityPersister

Open armellin opened this issue 1 year ago • 18 comments

Bug Report

Q A
BC Break no
Version 2.14.1

Summary

In Persisters/Entity/BasicEntityPersister.php:1727 there is an access to $assoc['isOwningSide'] but $assoc may be null:

private function getSelectConditionStatementColumnSQL(
        string $field,
        ?array $assoc = null
    ): array
{
    // ........
                $joinColumns   = $assoc['isOwningSide']
                    ? $association['joinTable']['joinColumns']
                    : $association['joinTable']['inverseJoinColumns'];

Current behavior

Validating an Entity with a ManyToMany association, I got that error.

armellin avatar Feb 17 '23 17:02 armellin