oroinc / platform

Main OroPlatform package with core functionality.
Other
628 stars 351 forks source link

EmailBundle:Form/Model/Email::removeAttachment - collection::remove expects a key as arg, not value (attachment) #853

Open dgspurgin opened 6 years ago

dgspurgin commented 6 years ago

vendor/oro/platform/src/Oro/Bundle/EmailBundle/Form/Model/Email.php

public function removeAttachment(EmailAttachment $attachment)
{
    if ($this->attachments->contains($attachment)) {
        $this->attachments->remove($attachment);
    }
}

remove() expect a collection key but a collection value is provide in current code.

mbessolov commented 6 years ago

internal issue ID - BAP-17462

anyt commented 6 years ago

Hi @dgspurgin,

Thank you for contribution, feel free to create pull request with the fix.