From: Lucas Werkmeister Date: Tue, 26 Mar 2019 13:13:51 +0000 (+0100) Subject: Use finally instead of try-catch-throw X-Git-Tag: 1.34.0-rc.0~2349 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/recherche.php?a=commitdiff_plain;h=46f79f8eb3293524543c4badfee8b3d3c4629cd1;p=lhc%2Fweb%2Fwiklou.git Use finally instead of try-catch-throw When this exception handler was introduced in change Ifbc1db4b82 (commit 9636d44448), MediaWiki still supported PHP 5.3.2, where finally was not available. It was added in PHP 5.5, though, which we’ve required for a while now, so we can simplify this a bit. Change-Id: I7c967fb713de7495739e18ff6c6058a630129fda --- diff --git a/includes/context/RequestContext.php b/includes/context/RequestContext.php index 2cbe67c525..a4225a1436 100644 --- a/includes/context/RequestContext.php +++ b/includes/context/RequestContext.php @@ -345,12 +345,8 @@ class RequestContext implements IContextSource, MutableContext { $obj = Language::factory( $code ); $this->lang = $obj; } - - unset( $this->recursion ); - } - catch ( Exception $ex ) { + } finally { unset( $this->recursion ); - throw $ex; } }