mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
WP_Theme: Return false from the display() method when get() fails.
Fixes a potential warning on the themes page when the active theme is deleted. fixes #26873. git-svn-id: https://develop.svn.wordpress.org/trunk@27745 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -128,4 +128,15 @@ class Tests_Theme_WPTheme extends WP_UnitTestCase {
|
||||
function filter_theme_with_spaces() {
|
||||
return 'subdir/theme with spaces';
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 26873
|
||||
*/
|
||||
function test_display_method_on_get_method_failure() {
|
||||
$theme = new WP_Theme( 'nonexistent', $this->theme_root );
|
||||
$this->assertEquals( 'nonexistent', $theme->get( 'Name' ) );
|
||||
$this->assertFalse( $theme->get( 'AuthorURI' ) );
|
||||
$this->assertFalse( $theme->get( 'Tags' ) );
|
||||
$this->assertFalse( $theme->display( 'Tags' ) );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user