mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Code formatting of ComponentSet::add()
MINOR Removed unused variable $id in ComponentSet::add() git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71615 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
fa4c42d642
commit
bbe3bc0535
@ -88,14 +88,11 @@ class ComponentSet extends DataObjectSet {
|
||||
user_error("ComponentSet::add() Tried to add an '{$item->class}' object, but a '{$this->childClass}' object expected", E_USER_ERROR);
|
||||
}
|
||||
} else {
|
||||
$id = $item;
|
||||
|
||||
if(!$this->childClass) {
|
||||
user_error("ComponentSet::add() \$this->childClass not set", E_USER_ERROR);
|
||||
}
|
||||
|
||||
$item = DataObject::get_by_id($this->childClass, $item);
|
||||
|
||||
if(!$item) return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user