Skip to content

Conversation

@cedric-anne
Copy link
Member

Checklist before requesting a review

  • I have read the CONTRIBUTING document.
  • I have performed a self-review of my code.
  • I have added tests that prove my fix is effective or that my feature works.

Description

It is sometimes difficult to understand why a CommonDBChild creation failed. Adding a message may help.

static::$mustBeAttached
&& !$this->getItemFromArray(static::$itemtype, static::$items_id, $input)
) {
Session::addMessageAfterRedirect(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this seems indeed a good idea, maybe we should rely on something more similar than checkAttachedItemChangesAllowed() do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants