From: Kunal Mehta Date: Tue, 4 Sep 2018 05:10:06 +0000 (-0700) Subject: SpecialPageExecutor: Use `finally` now that we're in a PHP 5.5+ world X-Git-Tag: 1.34.0-rc.0~4187^2 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=3394368bc5b5bba744bb8f2d8adcaaa53abe1a4a;p=lhc%2Fweb%2Fwiklou.git SpecialPageExecutor: Use `finally` now that we're in a PHP 5.5+ world Change-Id: I2f91998781be492557d90444b773951ae1e1580e --- 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; }