mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-17 03:56:07 +00:00
Avoid PHP notice when attempting to edit a site that does not exist.
Show a more explicit error - "The requested site does not exist." Fixes #32934. Built from https://develop.svn.wordpress.org/trunk@33144 git-svn-id: http://core.svn.wordpress.org/trunk@33115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0bc0b0c917
commit
eb26a74073
@ -42,6 +42,10 @@ if ( ! $id ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$details = get_blog_details( $id );
|
$details = get_blog_details( $id );
|
||||||
|
if ( ! $details ) {
|
||||||
|
wp_die( __( 'The requested site does not exist.' ) );
|
||||||
|
}
|
||||||
|
|
||||||
if ( ! can_edit_network( $details->site_id ) ) {
|
if ( ! can_edit_network( $details->site_id ) ) {
|
||||||
wp_die( __( 'You do not have permission to access this page.' ), 403 );
|
wp_die( __( 'You do not have permission to access this page.' ), 403 );
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,10 @@ if ( ! $id )
|
|||||||
wp_die( __('Invalid site ID.') );
|
wp_die( __('Invalid site ID.') );
|
||||||
|
|
||||||
$details = get_blog_details( $id );
|
$details = get_blog_details( $id );
|
||||||
|
if ( ! $details ) {
|
||||||
|
wp_die( __( 'The requested site does not exist.' ) );
|
||||||
|
}
|
||||||
|
|
||||||
if ( !can_edit_network( $details->site_id ) )
|
if ( !can_edit_network( $details->site_id ) )
|
||||||
wp_die( __( 'You do not have permission to access this page.' ), 403 );
|
wp_die( __( 'You do not have permission to access this page.' ), 403 );
|
||||||
|
|
||||||
|
@ -56,6 +56,10 @@ if ( ! $id )
|
|||||||
$wp_list_table->prepare_items();
|
$wp_list_table->prepare_items();
|
||||||
|
|
||||||
$details = get_blog_details( $id );
|
$details = get_blog_details( $id );
|
||||||
|
if ( ! $details ) {
|
||||||
|
wp_die( __( 'The requested site does not exist.' ) );
|
||||||
|
}
|
||||||
|
|
||||||
if ( !can_edit_network( $details->site_id ) )
|
if ( !can_edit_network( $details->site_id ) )
|
||||||
wp_die( __( 'You do not have permission to access this page.' ), 403 );
|
wp_die( __( 'You do not have permission to access this page.' ), 403 );
|
||||||
|
|
||||||
|
@ -49,6 +49,10 @@ if ( ! $id )
|
|||||||
wp_die( __('Invalid site ID.') );
|
wp_die( __('Invalid site ID.') );
|
||||||
|
|
||||||
$details = get_blog_details( $id );
|
$details = get_blog_details( $id );
|
||||||
|
if ( ! $details ) {
|
||||||
|
wp_die( __( 'The requested site does not exist' ) );
|
||||||
|
}
|
||||||
|
|
||||||
if ( ! can_edit_network( $details->site_id ) )
|
if ( ! can_edit_network( $details->site_id ) )
|
||||||
wp_die( __( 'You do not have permission to access this page.' ), 403 );
|
wp_die( __( 'You do not have permission to access this page.' ), 403 );
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.3-beta2-33143';
|
$wp_version = '4.3-beta2-33144';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user