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

2.3: Fix bug with link to widget #1068

Merged

Conversation

alexislefebvre
Copy link
Member

@alexislefebvre alexislefebvre commented May 29, 2018

Type

Bugfix

Purpose

Fixes a fatal exception when a link has no widget associated to:

Call to a member function getId() on null

The attachedProperty is nullable:

* @ORM\JoinColumn(name="attached_widget_id", referencedColumnName="id", onDelete="cascade", nullable=true)

So there's no guarantee than attachedProperty is defined in the context of this PR, hence I added a check in order to avoid the error.

I think that it happened because:

  1. a link that pointed to a widget was added
  2. the widget was deleted
  3. the link lost its attachedProperty and this triggered this error

BC Break

NO

@lenybernard lenybernard merged commit 84a7abd into Victoire:2.3 Jul 31, 2018
@alexislefebvre alexislefebvre deleted the 2.3-fix-bug-with-link-to-widget branch July 31, 2018 16:12
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.

None yet

2 participants