mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
c539687eb2
commit
c998006b2c
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user