Opened 5 years ago
Closed 5 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 |
|---|---|---|---|
| Priority: | normal | Milestone: | 10.0.0 |
| Component: | Groups | Version: | |
| Severity: | normal | 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
@
5 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
@espellcaste what do you think of it
^^?