From: Tim Düsterhus Date: Tue, 28 Jun 2016 22:44:30 +0000 (+0200) Subject: Use 'finally' in HTTPRequest X-Git-Tag: 3.0.0_Beta_1~1315 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=50e71b23fdc8c92fca62b418cc917f13253e3737;p=GitHub%2FWoltLab%2FWCF.git Use 'finally' in HTTPRequest --- 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;