[buddypress-trac] [BuddyPress] #4185: Calling groups_get_group() with a non-existent group id returns a BP_Groups_Group object populated with the provided ID
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Mon May 21 12:28:41 UTC 2012
#4185: Calling groups_get_group() with a non-existent group id returns a
BP_Groups_Group object populated with the provided ID
--------------------------+-----------------------------
Reporter: chriskeeble | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Groups | Version: 1.5.5
Severity: normal | Resolution:
Keywords: dev-feedback |
--------------------------+-----------------------------
Comment (by boonebgorges):
This is not an issue with groups_get_group() but with the BP_Groups_Group
class itself. If you instantiate the class like this
{{{
$group = new BP_Groups_Group( $nonexistent_group_id );
}}}
it'll return an object with all properties null except for 'id', which
will be $nonexistent_group_id. `groups_get_group()` is just a wrapper, and
doesn't affect this aspect of the behavior.
So I agree with DJPaul that we can't just change it - it's likely that
there are plugins relying on this odd behavior. If we wait until after
1.6, then we can make a breaking change and publicize it widely. As it
stands, we are too close to release.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4185#comment:3>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list