MINOR Fixed PHP Notices in Member.php

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65146 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2008-11-03 13:48:04 +00:00
parent c539687eb2
commit c998006b2c

View File

@ -527,7 +527,7 @@ class Member extends DataObject {
* @return bool Returns TRUE if the member is in one of the given groups, otherwise FALSE.
*/
public function inGroups($groups, $strict = false) {
foreach($groups as $group) {
if($groups) foreach($groups as $group) {
if($this->inGroup($group, $strict)) return true;
}
@ -555,7 +555,7 @@ class Member extends DataObject {
}
$groupCandidateObjs = ($strict) ? $this->getManyManyComponents("Groups") : $this->Groups();
foreach($groupCandidateObjs as $groupCandidateObj) {
if($groupCandidateObjs) foreach($groupCandidateObjs as $groupCandidateObj) {
if($groupCandidateObj->ID == $groupCheckObj->ID) return true;
}