[wp-trac] [WordPress Trac] #56484: Site Health: Use $wpdb->db_server_info() to retrieve database server type
WordPress Trac
noreply at wordpress.org
Thu Sep 1 14:01:24 UTC 2022
#56484: Site Health: Use $wpdb->db_server_info() to retrieve database server type
---------------------------------------------+---------------------
Reporter: SergeyBiryukov | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 6.1
Component: Site Health | Version:
Severity: normal | Resolution:
Keywords: good-first-bug has-patch commit | Focuses:
---------------------------------------------+---------------------
Comment (by SergeyBiryukov):
Thanks for the patch! It looks good to me too.
I had a concern about whether this method would be available in custom
database drop-ins (`wp-content/db.php`), but it looks like they are
[source:tags/6.0.2/src/wp-includes/load.php?marks=548-550#L537 loaded
after wpdb], and are supposed to extend the class, rather than completely
replace it, though technically the latter is possible too.
@Clorith, do you this change is safe as is, or should we check if the
method exists, just in case, and fall back to the current code if it
doesn't? Upon a quick check, popular drop-ins like
[https://wordpress.org/plugins/hyperdb/ HyperDB] extend the `wpdb` class,
so the patch seems good to go.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56484#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list