From 1b84ec82cb99a29f4c5b57e5ceb7bc7de2d894a8 Mon Sep 17 00:00:00 2001 From: nacin Date: Sun, 4 Mar 2012 12:58:41 +0000 Subject: [PATCH] Provide back compat for $theme->$var where $theme was an array from get_themes() but cast to an object, as had occurred in get_theme_updaes(). see #20173. see #20103. git-svn-id: http://svn.automattic.com/wordpress/trunk@20112 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-theme.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-includes/class-wp-theme.php b/wp-includes/class-wp-theme.php index d86f74fb0..37b73f2cc 100644 --- a/wp-includes/class-wp-theme.php +++ b/wp-includes/class-wp-theme.php @@ -292,6 +292,9 @@ final class WP_Theme implements ArrayAccess { return $this->get_theme_root(); case 'theme_root_uri' : return $this->get_theme_root_uri(); + // For cases where the array was converted to an object. + default : + return $this->offsetGet( $offset ); } }