From bd2c067245e277fba840489cffa2c2c9d0e65dbf Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Wed, 25 Feb 2015 03:54:25 +0000 Subject: [PATCH] Make sure WP_Customize_Manager::theme() never returns null. * Fixes issue in [31533] that caused unit test fatal error fixes #31445 Built from https://develop.svn.wordpress.org/trunk@31536 git-svn-id: http://core.svn.wordpress.org/trunk@31517 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-customize-manager.php | 3 +++ wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-wp-customize-manager.php b/wp-includes/class-wp-customize-manager.php index 76a143d261..8a254eecdb 100644 --- a/wp-includes/class-wp-customize-manager.php +++ b/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; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 44edfb67c6..2319482c1f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-alpha-31535'; +$wp_version = '4.2-alpha-31536'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.