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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42205 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2017-11-20 06:20:23 +00:00
parent 4af1237176
commit 61904426e2
1 changed files with 1 additions and 1 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>';