Skip to:
Content

#7388 closed defect (bug) (fixed)

`bp_get_new_group_id()` should return an integer

Reported by: boonebgorges Owned by: 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
19 months ago

  • Keywords commit added; 2nd-opinion removed

No objections here. Thanks for catching this.

#2 @dcavins
19 months ago

Thumbs up from me, too.

#3 @boonebgorges
19 months 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.