Opened 3 years ago
Closed 3 years ago
#8567 closed defect (bug) (fixed)
Newly introduced `bp_get_group()` should be less restrictive checking the Group object
Reported by: | imath | Owned by: | imath |
---|---|---|---|
Milestone: | 10.0.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Groups | Keywords: | has-patch commit |
Cc: |
Description
When listing Groups within the Groups WP Administration screen bp_get_group_permalink()
is generating a notice error since [13085]. Reason is the BP_Groups_List_Table
is not using a BP_Groups_Group
but a standard object. As it's possible to use a custom class to set a Group object (see https://buddypress.trac.wordpress.org/browser/trunk/src/bp-groups/classes/class-bp-groups-component.php#L251) I believe we should allow a regular object having an id
property.
Attachments (1)
Change History (6)
#2
@
3 years ago
My only concern there is that you can pass an object which might not be actually a BP_Groups_Group
object.
What about updating $view_url = bp_get_group_permalink( $item_obj );
and pass the object ID instead of the object itself?
I'm fine with either option. But I'd lean on updating the column_comment
method.
@espellcaste what do you think of it
^^
?