From 1cb6b5c8ee5338d271abb7b2b4e5a11cb0599587 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Wed, 11 Feb 2009 00:14:42 +0000 Subject: [PATCH] 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 --- core/model/ComponentSet.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/model/ComponentSet.php b/core/model/ComponentSet.php index a84b0c164..1aacf6270 100755 --- a/core/model/ComponentSet.php +++ b/core/model/ComponentSet.php @@ -73,6 +73,10 @@ class ComponentSet extends DataObjectSet { $parentField = $this->ownerClass . 'ID'; $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;