DB Repair: Only allow non-falsey values of WP_ALLOW_REPAIR to access the DB repair functionality.

This allows defining the constant as `false` to prevent access (rather than requiring the constant to be removed entirely).

Props tiagohillebrandt, munklefish.
See #11717.
Fixes #42622.

Built from https://develop.svn.wordpress.org/trunk@42205


git-svn-id: http://core.svn.wordpress.org/trunk@42034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2017-11-20 06:21:52 +00:00
parent 4ef018df2b
commit 71bdb1635b
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ header( 'Content-Type: text/html; charset=utf-8' );
<?php
if ( ! defined( 'WP_ALLOW_REPAIR' ) ) {
if ( ! defined( 'WP_ALLOW_REPAIR' ) || ! WP_ALLOW_REPAIR ) {
echo '<h1 class="screen-reader-text">' . __( 'Allow automatic database repair' ) . '</h1>';

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-42203';
$wp_version = '5.0-alpha-42205';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.