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

WordPress Trac noreply at wordpress.org
Wed Mar 27 13:57:01 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:  has-patch     |     Focuses:
--------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * milestone:  5.3 => 5.2


Comment:

 Replying to [comment:4 SergeyBiryukov]:
 > Currently, the `die()` call in `wp_check_mysql_version()` leaves a
 broken markup on `wp-admin/install.php` with no closing `</body>` tag.

 Looks like I was wrong here. In my testing, I edited
 `$wpdb->check_database_version()` to always return an error. I should have
 edited `$required_mysql_version` instead.

 Turned out `wp-admin/install.php` [source:tags/5.1.1/src/wp-
 admin/install.php#L228 already checks PHP and MySQL requirements] before
 running `wp_install()`, so [attachment:"45975.diff"] is fine as is, no
 need for a second check there.

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


More information about the wp-trac mailing list