From 9cdbf73c9c8c78f538d387521f55f8dc1a84451c Mon Sep 17 00:00:00 2001 From: Bill Pirkle Date: Fri, 14 Dec 2018 15:55:28 -0600 Subject: [PATCH] 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 --- includes/http/MWHttpRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ) { -- 2.20.1