diff --git src/bp-groups/bp-groups-functions.php src/bp-groups/bp-groups-functions.php
index 901ef22a7..5ba4299bf 100644
|
|
function bp_get_group_by( $field, $value ) { |
105 | 105 | * |
106 | 106 | * @global BP_Groups_Template $groups_template Groups template object. |
107 | 107 | * |
108 | | * @param false|int|string|BP_Groups_Group $group (Optional) The Group ID, the Group Slug or the Group object. |
109 | | * Default: false. |
| 108 | * @param false|int|string|object|BP_Groups_Group $group (Optional) The Group ID, the Group Slug or the Group object. |
| 109 | * Default: false. |
110 | 110 | * @return BP_Groups_Group|bool The Group object if found, false otherwise. |
111 | 111 | */ |
112 | 112 | function bp_get_group( $group = false ) { |
… |
… |
function bp_get_group( $group = false ) { |
114 | 114 | |
115 | 115 | $group_obj = false; |
116 | 116 | |
117 | | if ( $group instanceof BP_Groups_Group ) { |
| 117 | if ( $group instanceof BP_Groups_Group || ( is_object( $group ) && ! empty( $group->id ) ) ) { |
118 | 118 | $group_obj = $group; |
119 | 119 | |
120 | 120 | // Nothing requested? Let's use the current Group of the Groups Loop, if available. |