From b7343414335d16dd47d56aa6f5a0dd66f7d166dd Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Wed, 25 Feb 2015 03:53:04 +0000 Subject: [PATCH] Make sure WP_Customize_Manager::theme() never returns null. * Fixes issue in [31533] that caused unit test fatal error fixes #31445 git-svn-id: https://develop.svn.wordpress.org/trunk@31536 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-customize-manager.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php index 76a143d261..8a254eecdb 100644 --- a/src/wp-includes/class-wp-customize-manager.php +++ b/src/wp-includes/class-wp-customize-manager.php @@ -314,6 +314,9 @@ final class WP_Customize_Manager { * @return WP_Theme */ public function theme() { + if ( ! $this->theme ) { + $this->theme = wp_get_theme(); + } return $this->theme; }