Skip to:
Content

BuddyPress.org

Opened 7 years ago

Closed 7 years ago

#7388 closed defect (bug) (fixed)

`bp_get_new_group_id()` should return an integer

Reported by: boonebgorges's profile boonebgorges Owned by: boonebgorges's profile boonebgorges
Milestone: 2.8 Priority: normal
Severity: normal Version: 1.9.2
Component: Groups Keywords: commit
Cc:

Description

Since [7790], it's returned a string, because it's passed through esc_attr(). We should sanitize using intval() instead.

This is technically a compatibility break, but it was fairly recently introduced and, I think, it's for proper reasons. Any objections to changing it?

Change History (3)

#1 @johnjamesjacoby
7 years ago

  • Keywords commit added; 2nd-opinion removed

No objections here. Thanks for catching this.

#2 @dcavins
7 years ago

Thumbs up from me, too.

#3 @boonebgorges
7 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 11299:

Return an integer from bp_get_new_group_id().

Sanitization techniques introduced in [7790] inadvertently caused
the value returned from this function to be a string, inconsistent
with the documentation and with previous behavior.

Fixes #7388.

Note: See TracTickets for help on using tickets.