mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 00:01:27 +01:00
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.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b6eb388ac4
commit
820ebbab9e
@ -485,10 +485,10 @@ final class WP_Theme implements ArrayAccess {
|
||||
if ( isset( $this->headers_sanitized[ $header ] ) )
|
||||
return $this->headers_sanitized[ $header ];
|
||||
|
||||
// If an external object cache does not consider themes to be a persistent group, sanitize everything and cache it.
|
||||
// If themes are a persistent group, sanitize everything and cache it. One cache add is better than many cache sets.
|
||||
if ( self::$persistently_cache ) {
|
||||
foreach ( array_keys( $this->headers ) as $header )
|
||||
$this->headers_sanitized[ $header ] = $this->sanitize_header( $header, $this->headers[ $header ] );
|
||||
foreach ( array_keys( $this->headers ) as $_header )
|
||||
$this->headers_sanitized[ $_header ] = $this->sanitize_header( $_header, $this->headers[ $_header ] );
|
||||
$this->cache_add( 'headers', $this->headers_sanitized );
|
||||
} else {
|
||||
$this->headers_sanitized[ $header ] = $this->sanitize_header( $header, $this->headers[ $header ] );
|
||||
|
Loading…
Reference in New Issue
Block a user