elofgren: VAR FIX: Initialize 'has' to an array and use isset() for removeList in ComponentSet::setByIDList() to fix undefined variable errors when saving 'SubscribeForm?' page.

(merged from branches/gsoc)


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@41819 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2007-09-14 23:38:26 +00:00
parent f9c5f25254
commit 3be2d445f9

View File

@ -159,6 +159,7 @@ class ComponentSet extends DataObjectSet {
* @param array $idList List of IDs. * @param array $idList List of IDs.
*/ */
function setByIDList($idList) { function setByIDList($idList) {
$has = array();
// Index current data // Index current data
if($this->items) { if($this->items) {
foreach( $this->items as $item ) foreach( $this->items as $item )