From 3394368bc5b5bba744bb8f2d8adcaaa53abe1a4a Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Mon, 3 Sep 2018 22:10:06 -0700 Subject: [PATCH] SpecialPageExecutor: Use `finally` now that we're in a PHP 5.5+ world Change-Id: I2f91998781be492557d90444b773951ae1e1580e --- tests/phpunit/includes/specials/SpecialPageExecutor.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tests/phpunit/includes/specials/SpecialPageExecutor.php b/tests/phpunit/includes/specials/SpecialPageExecutor.php index 9572e30119..abb0d11dbc 100644 --- a/tests/phpunit/includes/specials/SpecialPageExecutor.php +++ b/tests/phpunit/includes/specials/SpecialPageExecutor.php @@ -117,15 +117,10 @@ class SpecialPageExecutor { } else { $html = $output->getHTML(); } - } catch ( Exception $ex ) { + } finally { ob_end_clean(); - - // Re-throw exception after "finally" handling because PHP 5.3 doesn't have "finally". - throw $ex; } - ob_end_clean(); - return $html; } -- 2.20.1