From 935ec6c1b42ba7e020412bcfc84b91c4484bafe5 Mon Sep 17 00:00:00 2001 From: Timothy Jacobs Date: Wed, 3 Jun 2020 02:06:03 -0400 Subject: [PATCH] wp_die() if populate_network returns a WP_Error instance. --- tests/phpunit/includes/install.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/includes/install.php b/tests/phpunit/includes/install.php index 4ab457f48ae9b..8ce307818d7d3 100644 --- a/tests/phpunit/includes/install.php +++ b/tests/phpunit/includes/install.php @@ -92,6 +92,11 @@ $subdomain_install = false; install_network(); - populate_network( 1, WP_TESTS_DOMAIN, WP_TESTS_EMAIL, $title, '/', $subdomain_install ); + $error = populate_network( 1, WP_TESTS_DOMAIN, WP_TESTS_EMAIL, $title, '/', $subdomain_install ); + + if ( is_wp_error( $error ) ) { + wp_die( $error ); + } + $wp_rewrite->set_permalink_structure( '' ); }