WordPress.org

Make WordPress Core

Opened 7 months ago

Last modified 4 months ago

#45761 new defect (bug)

consistency between $wpdb->blogid and get_current_blog_id()

Reported by: arena Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.0
Component: Networks and Sites Keywords: needs-patch dev-feedback
Focuses: multisite Cc:

Description

On a single install (not multisite),

you have

$wpdb->blogid => 0

get_current_blog_id() => 1

Must be a very old one !!!

Change History (3)

#1 @johnjamesjacoby
7 months ago

  • Component changed from General to Networks and Sites
  • Focuses multisite added
  • Keywords needs-patch added
  • Version changed from trunk to 3.0

#3 @keraweb
4 months ago

  • Keywords dev-feedback added

A check in the wpdb::__construct() for is_multisite() could fix this. If it's not a multisite then set blogid to 1.

Note: See TracTickets for help on using tickets.