From 62b72147069c649802989180e0b636d211df998c Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 12 Sep 2013 04:13:11 +0000 Subject: [PATCH] Avoid an undefined index error in `tests/phpunit/tests/dependencies/styles.php` See #25282. git-svn-id: https://develop.svn.wordpress.org/trunk@25376 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/dependencies/styles.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/phpunit/tests/dependencies/styles.php b/tests/phpunit/tests/dependencies/styles.php index 4726c034fa..693130a897 100644 --- a/tests/phpunit/tests/dependencies/styles.php +++ b/tests/phpunit/tests/dependencies/styles.php @@ -8,6 +8,8 @@ class Tests_Dependencies_Styles extends WP_UnitTestCase { function setUp() { parent::setUp(); + if ( empty( $GLOBALS['wp_styles'] ) ) + $GLOBALS['wp_styles'] = null; $this->old_wp_styles = $GLOBALS['wp_styles']; remove_action( 'wp_default_styles', 'wp_default_styles' ); $GLOBALS['wp_styles'] = new WP_Styles();