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:
Sean Harvey 2009-02-10 06:21:08 +00:00
parent fa4c42d642
commit bbe3bc0535

View File

@ -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;
}