Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/CommonDBChild.php
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,11 @@ public function prepareInputForAdd($input)
static::$mustBeAttached
&& !$this->getItemFromArray(static::$itemtype, static::$items_id, $input)
) {
Session::addMessageAfterRedirect(
__s('Parent item is invalid.'),
true,
ERROR
);
return false;
}

Expand All @@ -460,6 +465,7 @@ public function prepareInputForUpdate($input)
static::$items_id,
])
) {
// A message is already added by `self::checkAttachedItemChangesAllowed()`
return false;
}

Expand Down
Loading