Skip to:
Content

Opened 15 months ago

Closed 15 months ago

Last modified 15 months ago

#7302 closed defect (bug) (fixed)

Improve backward compatibility in `groups_get_group()`.

Reported by: dcavins Owned by: dcavins
Milestone: 2.7.1 Priority: normal
Severity: normal Version: 2.7
Component: Groups Keywords: has-patch commit
Cc: dcavins

Description

In r11090, we changed the signature of groups_get_group() to accept an integer (group_id) and added backcompat for the most commonly used former signature, an associative array. However, it was also possible to use a query string-style argument, because wp_parse_args() could handle that.

Patch forthcoming.

Attachments (2)

7302.1.patch (2.2 KB) - added by dcavins 15 months ago.
Handle integers, arrays, and query string arguments.
7302.2.patch (2.2 KB) - added by dcavins 15 months ago.
Fix spacing.

Download all attachments as: .zip

Change History (7)

@dcavins
15 months ago

Handle integers, arrays, and query string arguments.

#1 @dcavins
15 months ago

  • Keywords has-patch added; needs-patch removed
  • Owner set to dcavins
  • Status changed from new to assigned

#2 @boonebgorges
15 months ago

  • Keywords commit added

7302.1.patch has irregular indentation, but otherwise looks like a good approach.

@dcavins
15 months ago

Fix spacing.

#3 @DJPaul
15 months ago

LGTM!

#4 @dcavins
15 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 11212:

Improve backward compatibility in groups_get_group().

In r11090, we changed the signature of groups_get_group() to accept
an integer and added backcompat for the most commonly used former
signature, an associative array. However, it was also possible to use a
query-string-style argument. This commit covers that case.

Fixes #7302 (for 2.7 branch).

#5 @dcavins
15 months ago

In 11213:

Improve backward compatibility in groups_get_group().

In r11090, we changed the signature of groups_get_group() to accept
an integer and added backcompat for the most commonly used former
signature, an associative array. However, it was also possible to use a
query-string-style argument. This commit covers that case.

Fixes #7302.

Note: See TracTickets for help on using tickets.