Opened 2 years ago
Last modified 9 months ago
#16762 new defect (bug)
wpdb::$base_prefix is not documented
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Database | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
Probably wpdb::$base_prefix has been merged into from MU and not further specified then.
It genereally can be replaced with wpdb::get_blog_prefix(0) when the MULTISITE constant is defined. That is are after wp-settings.php has been included (wp-config.php, wp-load.php), even on SHORTINIT.
It might be that this function call does not cover all cases needed because if MULTISITE is not defined when called, it will not return the wpdb::$base_prefix.
More insight into MU is needed, feedback appreceated. Some places look like that they are not aware of the wpdb::get_blog_prefix() function. Probably legacy MU code.
Related: #16756

I'm a bit unsure for the first change in user.php, the second and the other two files look good to me.