Skip to content

Commit

Permalink
Coding Standards: Correct db_version check in wp-admin/admin.php.
Browse files Browse the repository at this point in the history
Follow-up to [47785].

See #49239.

git-svn-id: https://develop.svn.wordpress.org/trunk@47787 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed May 12, 2020
1 parent b42fe1e commit 6e8ab84
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/wp-admin/admin.php
Expand Up @@ -36,6 +36,7 @@
nocache_headers();

if ( get_option( 'db_upgraded' ) ) {

flush_rewrite_rules();
update_option( 'db_upgraded', false );

Expand All @@ -45,7 +46,9 @@
* @since 2.8.0
*/
do_action( 'after_db_upgrade' );
} elseif ( get_option( 'db_version' ) !== $wp_db_version && empty( $_POST ) ) {

} elseif ( (int) get_option( 'db_version' ) !== $wp_db_version && empty( $_POST ) ) {

if ( ! is_multisite() ) {
wp_redirect( admin_url( 'upgrade.php?_wp_http_referer=' . urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) );
exit;
Expand Down

0 comments on commit 6e8ab84

Please sign in to comment.