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
if
statement, because&&
has precedence over||
, the code actually bypasseswp-sitemap.xml
regardless of whethercf_bypass_sitemap
is 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)
- You must be logged in to reply to this topic.