Changeset 45910 for trunk/src/wp-includes/class-wp-network.php
- Timestamp:
- 08/29/2019 12:41:45 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-network.php
r42876 r45910 102 102 $_network = wp_cache_get( $network_id, 'networks' ); 103 103 104 if ( !$_network ) {104 if ( false === $_network ) { 105 105 $_network = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->site} WHERE id = %d LIMIT 1", $network_id ) ); 106 106 107 107 if ( empty( $_network ) || is_wp_error( $_network ) ) { 108 return false;108 $_network = -1; 109 109 } 110 110 111 111 wp_cache_add( $network_id, $_network, 'networks' ); 112 } 113 114 if ( is_numeric( $_network ) ) { 115 return false; 112 116 } 113 117 … … 232 236 } 233 237 234 if ( ( defined( 'DOMAIN_CURRENT_SITE' ) && defined( 'PATH_CURRENT_SITE' ) && $this->domain === DOMAIN_CURRENT_SITE && $this->path === PATH_CURRENT_SITE)235 || ( defined( 'SITE_ID_CURRENT_SITE' ) && $this->id == SITE_ID_CURRENT_SITE) ) {238 if ( ( defined( 'DOMAIN_CURRENT_SITE' ) && defined( 'PATH_CURRENT_SITE' ) && DOMAIN_CURRENT_SITE === $this->domain && PATH_CURRENT_SITE === $this->path ) 239 || ( defined( 'SITE_ID_CURRENT_SITE' ) && SITE_ID_CURRENT_SITE == $this->id ) ) { 236 240 if ( defined( 'BLOG_ID_CURRENT_SITE' ) ) { 237 241 $this->blog_id = (string) BLOG_ID_CURRENT_SITE; … … 458 462 } 459 463 } 460 if ( $network->path === '/') {464 if ( '/' === $network->path ) { 461 465 $found = true; 462 466 break;
Note: See TracChangeset
for help on using the changeset viewer.