#4118 closed Defect (fixed)
leave() and leave_group() inconsitencies in return values
| Reported by: | andres.fortier | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | Elgg 1.8.2 |
| Component: | Core | Version: | 1.8.1 |
| Severity: | minor | Keywords: | |
| Cc: | brett@… | Difficulty: |
Description
From ElggGroup.php:
/** * Remove a user from a group. * * @param int $group_guid The group. * @param int $user_guid The user. * * @return bool */ function leave_group($group_guid, $user_guid)
On success it returns 1, not true. And then:
/**
* Remove a user from the group.
*
* @param ElggUser $user User
*
* @return void
*/
public function leave(ElggUser $user)
{
return leave_group($this->getGUID(), $user->getGUID());
}
Thus, the function states it returns void while it really returns a number representing a boolean.
Change History (3)
comment:1 Changed 18 months ago by cash
- Milestone changed from Needs Review to Elgg 1.8.2
- Priority changed from normal to low
comment:2 Changed 18 months ago by cash
- Resolution set to fixed
- Status changed from new to closed
comment:3 Changed 18 months ago by cash
Fixes #4118 returning bool from leave group functions
Changeset: 90baebb659b3e47dac24da969e232ff0cef94a1b
Note: See
TracTickets for help on using
tickets.

Fixes #4118 returning bool from leave group functions