Bug report for cache_controller.class.php
-
1484 // Bypass sitemap
1485 if ( $this->main_instance->get_single_config( 'cf_bypass_sitemap', 0 ) > 0 && strcasecmp( $_SERVER['REQUEST_URI'], '/sitemap_index.xml' ) == 0 || preg_match( '/[a-zA-Z0-9]-sitemap.xml$/', $_SERVER['REQUEST_URI'] ) ) {
1486 Helpers::bypass_reason_header( 'Sitemap' );
1487
1488 return true;
1489 }In the
ifstatement, because&&has precedence over||, the code actually bypasseswp-sitemap.xmlregardless of whethercf_bypass_sitemapis set. What’s needed here isif ( $this->main_instance->get_single_config( 'cf_bypass_sitemap', 0 ) > 0 && ( strcasecmp( $_SERVER['REQUEST_URI'], '/sitemap_index.xml' ) == 0 || preg_match( '/[a-zA-Z0-9]-sitemap.xml$/', $_SERVER['REQUEST_URI'] ) ) ) {}
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Bug report for cache_controller.class.php’ is closed to new replies.