[wp-trac] [WordPress Trac] #20313: get_theme_data can cause invalid WP_Theme object data to be persistantly cached
WordPress Trac
wp-trac at lists.automattic.com
Wed Mar 28 20:02:34 UTC 2012
#20313: get_theme_data can cause invalid WP_Theme object data to be persistantly
cached
--------------------------+--------------------
Reporter: westi | Owner: nacin
Type: defect (bug) | Status: new
Priority: high | Milestone: 3.4
Component: Themes | Version: 3.4
Severity: major | Resolution:
Keywords: has-patch |
--------------------------+--------------------
Comment (by nacin):
Yeah, I definitely see what went wrong here. Nice catch.
`new WP_Theme( 'twentyten', WP_CONTENT_DIR . '/themes/pub' )` should not
work... It should recognize that the theme root is not a valid one and
that the stylesheet should instead be twentyten/pub. Either it should
error out by saying the theme does not exist, or it should correct the
theme root and stylesheet on the fly to reflect the proper placement of
/pub.
I will take a closer look at the patch -- not sure it will always work due
to the finickiness of get_theme_root().
Yeah, testing the cached data can be tough. cache_delete() is a public
method, so that could be used to test before/after situations.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20313#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list