WordPress.org

Make WordPress Core

Ticket #13638: 13638.3.diff

File 13638.3.diff, 504 bytes (added by wpmuguru, 5 years ago)
  • wp-includes/classes.php

     
    145145                // Fetch the rewrite rules. 
    146146                $rewrite = $wp_rewrite->wp_rewrite_rules(); 
    147147 
    148                 if ( ! empty($rewrite) ) { 
     148                if ( ! empty($rewrite) && defined( 'WP_USE_THEMES' ) && WP_USE_THEMES ) { 
    149149                        // If we match a rewrite rule, this will be cleared. 
    150150                        $error = '404'; 
    151151                        $this->did_permalink = true;