BUGFIX Added E_USER_ERROR error to ComponentSet::getExtraData() if a non-numeric child ID is passed

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71639 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-02-11 00:14:42 +00:00
parent df36ae07e8
commit 1cb6b5c8ee

View File

@ -74,6 +74,10 @@ class ComponentSet extends DataObjectSet {
$childField = ($this->childClass == $this->ownerClass) ? 'ChildID' : ($this->childClass . 'ID');
$result = array();
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