Make WordPress Core


Ignore:
Timestamp:
07/09/2015 04:28:42 PM (11 years ago)
Author:
jeremyfelt
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/network/site-settings.php

    r32974 r33144  
    4040
    4141$details = get_blog_details( $id );
     42if ( ! $details ) {
     43    wp_die( __( 'The requested site does not exist.' ) );
     44}
     45
    4246if ( !can_edit_network( $details->site_id ) )
    4347    wp_die( __( 'You do not have permission to access this page.' ), 403 );
Note: See TracChangeset for help on using the changeset viewer.