From 265e2da819f994b0a52cb42ccd160511371a8f9b Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 28 Mar 2019 15:10:24 +0000 Subject: [PATCH] Site Health: Use a consistent wording and response code for capability checks. Props mukesh27 for initial patch. Fixes #46691. git-svn-id: https://develop.svn.wordpress.org/trunk@45050 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/site-health-info.php | 2 +- src/wp-admin/site-health.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/site-health-info.php b/src/wp-admin/site-health-info.php index 571c221dd6..4499381eb9 100644 --- a/src/wp-admin/site-health-info.php +++ b/src/wp-admin/site-health-info.php @@ -10,7 +10,7 @@ require_once( dirname( __FILE__ ) . '/admin.php' ); if ( ! current_user_can( 'install_plugins' ) ) { - wp_die( __( 'Sorry, you do not have permission to access the debug data.' ), '', array( 'reponse' => 401 ) ); + wp_die( __( 'Sorry, you are not allowed to access the debug data.' ), '', 403 ); } wp_enqueue_style( 'site-health' ); diff --git a/src/wp-admin/site-health.php b/src/wp-admin/site-health.php index 2457cc3eee..62279e7daa 100644 --- a/src/wp-admin/site-health.php +++ b/src/wp-admin/site-health.php @@ -15,7 +15,7 @@ if ( isset( $_GET['tab'] ) && 'debug' === $_GET['tab'] ) { require_once( dirname( __FILE__ ) . '/admin.php' ); if ( ! current_user_can( 'install_plugins' ) ) { - wp_die( __( 'Sorry, you do not have permission to access site health information.' ), '', array( 'reponse' => 401 ) ); + wp_die( __( 'Sorry, you are not allowed to access site health information.' ), '', 403 ); } wp_enqueue_style( 'site-health' );