[buddypress-trac] [BuddyPress Trac] #9019: `bp_is_group()` can return true on the group creation page
buddypress-trac
noreply at wordpress.org
Thu Nov 9 21:48:14 UTC 2023
#9019: `bp_is_group()` can return true on the group creation page
------------------------------------+----------------------
Reporter: r-a-y | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Up Next
Component: Core | Version: 11.0.0
Severity: normal | Resolution:
Keywords: dev-feedback has-patch |
------------------------------------+----------------------
Comment (by r-a-y):
> I can also imagine devs thinking that the group creation process should
be included in bp_is_group().
If you look at the PHPDoc for `bp_is_group()`, `bp_is_group()` is meant to
return true only when on a single group page.
I had some code that was doing checks for `bp_is_group()` and then doing
some group nav changes, but since the group nav is only available when on
a single group page, a fatal error occurred after group creation because
the group nav wasn't available at that time. I guess I could have checked
if the group nav was available and then I wouldn't have run into the fatal
error, but the `bp_is_group()` behavior was odd enough that I wanted to
create a ticket about it.
This patch isn't important to be in BP 12.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/9019#comment:4>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list