mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
mlanthaler: Bugfix: The added isset() caused a bug when adding a new member because it produces an invalid SQL statement ("... WHERE (ID IN ())"). (merged from branches/gsoc)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@41784 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
6b2b21e735
commit
b0e9e89aad
@ -290,7 +290,7 @@ class Member extends DataObject {
|
|||||||
|
|
||||||
$table = "Group_Members";
|
$table = "Group_Members";
|
||||||
|
|
||||||
if(isset($collatedGroups)) {
|
if(count($collatedGroups) > 0) {
|
||||||
$collatedGroups = implode(", ", array_unique($collatedGroups));
|
$collatedGroups = implode(", ", array_unique($collatedGroups));
|
||||||
|
|
||||||
$result = singleton('Group')->instance_get("`ID` IN ($collatedGroups)", "ID", "", "", "Member_GroupSet");
|
$result = singleton('Group')->instance_get("`ID` IN ($collatedGroups)", "ID", "", "", "Member_GroupSet");
|
||||||
|
Loading…
Reference in New Issue
Block a user