diff --git a/core/model/ComponentSet.php b/core/model/ComponentSet.php index 1aacf6270..22bb0deef 100755 --- a/core/model/ComponentSet.php +++ b/core/model/ComponentSet.php @@ -73,13 +73,15 @@ class ComponentSet extends DataObjectSet { $parentField = $this->ownerClass . 'ID'; $childField = ($this->childClass == $this->ownerClass) ? 'ChildID' : ($this->childClass . 'ID'); $result = array(); + + if(!isset($componentName)) { + user_error('ComponentSet::getExtraData() passed a NULL component name', E_USER_ERROR); + } if(!is_numeric($childID)) { user_error('ComponentSet::getExtraData() passed a non-numeric child ID', E_USER_ERROR); } - if(!$componentName) return false; - // @todo Optimize into a single query instead of one per extra field $extraFields = $ownerObj->many_many_extraFields($componentName); if($extraFields) {