[wp-trac] [WordPress Trac] #45975: wp_check_mysql_version should use wp_die

WordPress Trac noreply at wordpress.org
Mon Mar 11 23:49:17 UTC 2019


#45975: wp_check_mysql_version should use wp_die
--------------------------+-----------------------------
 Reporter:  spacedmonkey  |       Owner:  SergeyBiryukov
     Type:  enhancement   |      Status:  reviewing
 Priority:  normal        |   Milestone:  5.2
Component:  Database      |     Version:  2.1
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * keywords:  has-patch => needs-patch


Comment:

 This would need some more changes.

 `wp_check_mysql_version()` is currently called from `wp_upgrade()` and
 `wp_install()`:

 * `wp_upgrade()` runs before any screen output, so far so good.
 * `wp_install()` runs after the opening `<body>` tag on `wp-
 admin/install.php`.

 Currently, the `die()` call in `wp_check_mysql_version()` leaves a broken
 markup on `wp-admin/install.php` with no closing `</body>` tag.

 With the patch, there are two `<html>` and `<body>` tags on the page,
 which is also invalid markup.

 If we're going with `wp_die()` here, we should make sure it happens before
 any output.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45975#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list