Opened 9 years ago
Last modified 9 years ago
#40695 new defect (bug)
`install_blog` suppresses database errors
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Future Release | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Database | Keywords: | has-patch |
| Focuses: | multisite | Cc: |
Description
install_blog uses error suppression and DESCRIBE $table to detect the absence of tables. Error suppression can be removed in favor of SHOW TABLES LIKE $table, as in the patch on #40694.
Another source of errors in install_blog is the call to get_blogaddress_by_id. This attempts to read the site's home attribute which hits the magic WP_Site->__get, which ultimately leads to a SELECT against the non-existent options table.
Attachments (1)
Change History (7)
This ticket was mentioned in Slack in #core-multisite by jeremyfelt. View the logs.
9 years ago
This ticket was mentioned in Slack in #core-multisite by andy. View the logs.
9 years ago
Note: See
TracTickets for help on using
tickets.
The
homeattribute is used only to determine http/https. This can be avoided by inlining the rest of the logic fromget_blogaddress_by_idintoinstall_blog. Patch attached.