You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DataList->column calls distinct(false) on its DataQuery without cloning it first, causing errors if the DataList is used for anything else afterwards.
Steps to Reproduce
Have a member in multiple groups. Run the following code.
$members = Member::get()->applyRelation('Groups.ID');
$members->column('ID'); // This mutates the DataQuery of $members and removes distinct.foreach ($membersas$member) {
echo$member->Name . "\n"; // members with multiple groups are represented multiple times
}
The text was updated successfully, but these errors were encountered:
Affected Version
Silverstripe 4.5
Description
DataList->column calls distinct(false) on its DataQuery without cloning it first, causing errors if the DataList is used for anything else afterwards.
Steps to Reproduce
Have a member in multiple groups. Run the following code.
The text was updated successfully, but these errors were encountered: