From abad85653431caafe1310b86288526e4cd366b55 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Wed, 22 May 2013 13:56:36 +1200 Subject: [PATCH] Use create() to instantiate Member_GroupSet on Member::Groups() Keeps it consistent with how HasManyList and ManyManyList are instantiated in DataObject. --- security/Member.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/Member.php b/security/Member.php index db2217641..674ed15f2 100644 --- a/security/Member.php +++ b/security/Member.php @@ -988,7 +988,7 @@ class Member extends DataObject implements TemplateGlobalProvider { * @todo Push all this logic into Member_GroupSet's getIterator()? */ public function Groups() { - $groups = Injector::inst()->create('Member_GroupSet', 'Group', 'Group_Members', 'GroupID', 'MemberID'); + $groups = Member_GroupSet::create('Group', 'Group_Members', 'GroupID', 'MemberID'); $groups = $groups->forForeignID($this->ID); $this->extend('updateGroups', $groups);