WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#26941 closed defect (bug) (fixed)

Too many arguments passed to prepare() during multisite load

Reported by: jeremyfelt Owned by: nacin
Milestone: 3.9 Priority: low
Severity: minor Version: 3.0
Component: Bootstrap/Load Keywords: has-patch commit
Focuses: multisite Cc:

Description

One of the queries that may be used to set $current_site in wpmu_current_site() passes too many arguments to the prepare() statement building the query. Because path in the query is set to /, there is no need to pass a $path argument.

This has been here since [12787] and looks like it may be an accidental match of the query right above it, which does need the 3 arguments. The additional argument doesn't cause any errors, just a little confusion when reading through the code.

Attachments (1)

26941.diff (815 bytes) - added by jeremyfelt 7 years ago.

Download all attachments as: .zip

Change History (3)

@jeremyfelt
7 years ago

#1 @nacin
7 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 3.9

#2 @nacin
7 years ago

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

In 27076:

Remove an unnecessary variable passed to wpdb::prepare() during multisite load.

props jeremyfelt.
fixes #26941.

Note: See TracTickets for help on using tickets.