WordPress.org

Make WordPress Core

Changeset 20126


Ignore:
Timestamp:
03/06/12 22:28:53 (2 years ago)
Author:
nacin
Message:

Fix variable collision in WP_Theme->get() that rears its head when the themes bucket is cached persistently. Also correct the inline doc. see #20103.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-theme.php

    r20119 r20126  
    486486            return $this->headers_sanitized[ $header ]; 
    487487 
    488         // If an external object cache does not consider themes to be a persistent group, sanitize everything and cache it. 
     488        // If themes are a persistent group, sanitize everything and cache it. One cache add is better than many cache sets. 
    489489        if ( self::$persistently_cache ) { 
    490             foreach ( array_keys( $this->headers ) as $header ) 
    491                 $this->headers_sanitized[ $header ] = $this->sanitize_header( $header, $this->headers[ $header ] ); 
     490            foreach ( array_keys( $this->headers ) as $_header ) 
     491                $this->headers_sanitized[ $_header ] = $this->sanitize_header( $_header, $this->headers[ $_header ] ); 
    492492            $this->cache_add( 'headers', $this->headers_sanitized ); 
    493493        } else { 
Note: See TracChangeset for help on using the changeset viewer.