Opened 9 years ago
Closed 9 years ago
#37118 closed enhancement (fixed)
Move call of get_blog_details() inside of ms_site_check()
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Bootstrap/Load | Keywords: | has-patch commit |
Focuses: | multisite | Cc: |
Description
get_blog_details()
is unnecessarily called at the top of ms_site_check()
. It should be called when the blog's details are actually needed.
When a non-web context is bypassing ms_site_check()
using the ms_site_check
filter, the call to get_blog_details()
causes a MySQL error notice when WordPress isn't yet installed.
Related #34936
From https://github.com/wp-cli/wp-cli/issues/2278#issuecomment-226634504
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
+1
Noting #36935 for cross-reference. We'll be able to replace this with
get_site()
at some point, but the move is good either way.