From 50e71b23fdc8c92fca62b418cc917f13253e3737 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 29 Jun 2016 00:44:30 +0200 Subject: [PATCH] Use 'finally' in HTTPRequest --- wcfsetup/install/files/lib/util/HTTPRequest.class.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/wcfsetup/install/files/lib/util/HTTPRequest.class.php b/wcfsetup/install/files/lib/util/HTTPRequest.class.php index 0f5a295043..7c239438d6 100644 --- a/wcfsetup/install/files/lib/util/HTTPRequest.class.php +++ b/wcfsetup/install/files/lib/util/HTTPRequest.class.php @@ -464,23 +464,14 @@ final class HTTPRequest { try { $newRequest->execute(); - - // update data with data from the inner request - $this->url = $newRequest->url; - $this->statusCode = $newRequest->statusCode; - $this->replyHeaders = $newRequest->replyHeaders; - $this->legacyHeaders = $newRequest->legacyHeaders; - $this->replyBody = $newRequest->replyBody; } - catch (SystemException $e) { + finally { // update data with data from the inner request $this->url = $newRequest->url; $this->statusCode = $newRequest->statusCode; $this->replyHeaders = $newRequest->replyHeaders; $this->legacyHeaders = $newRequest->legacyHeaders; $this->replyBody = $newRequest->replyBody; - - throw $e; } return; -- 2.20.1