Make WordPress Core


Ignore:
Timestamp:
07/09/2015 04:28:42 PM (9 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-info.php

    r32974 r33144  
    4343
    4444$details = get_blog_details( $id );
     45if ( ! $details ) {
     46    wp_die( __( 'The requested site does not exist.' ) );
     47}
     48
    4549if ( ! can_edit_network( $details->site_id ) ) {
    4650    wp_die( __( 'You do not have permission to access this page.' ), 403 );
Note: See TracChangeset for help on using the changeset viewer.