From: Bill Pirkle Date: Fri, 14 Dec 2018 21:55:28 +0000 (-0600) Subject: Fix exception on certain http failures X-Git-Tag: 1.34.0-rc.0~3246 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=9cdbf73c9c8c78f538d387521f55f8dc1a84451c;p=lhc%2Fweb%2Fwiklou.git Fix exception on certain http failures Task T202110 included a change to recognize an HTTP status code of 0 (zero) as an error, but it failed to set a status message, resulting in an exception. Changed to set a status message of 'Error' so that required value is not empty. Bug: T212005 Change-Id: I5fb78555bfcaeccdd726432f4dfc70924a385c41 --- diff --git a/includes/http/MWHttpRequest.php b/includes/http/MWHttpRequest.php index b0870193c8..2cf532084c 100644 --- a/includes/http/MWHttpRequest.php +++ b/includes/http/MWHttpRequest.php @@ -387,7 +387,7 @@ abstract class MWHttpRequest implements LoggerAwareInterface { // Failure without (valid) headers gets a response status of zero if ( !$this->status->isOK() ) { - $this->respStatus = '0'; + $this->respStatus = '0 Error'; } foreach ( $this->headerList as $header ) {