From: Alexander I. Mashin Date: Tue, 2 Aug 2016 13:08:05 +0000 (+0700) Subject: Fix to incorrect calls of header () breaking saving some pages and login X-Git-Tag: 1.31.0-rc.0~5412 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=0c34f5fc1a7ebedb4307e1f54a70a5009d9115dc;p=lhc%2Fweb%2Fwiklou.git Fix to incorrect calls of header () breaking saving some pages and login This is to fix incorrect calls of header () with null as its third parametre in WebResponse::header (). Under HHVM 3.14.3 this causes warnings in error.log and breaks saving page and user login. Bug: T140864 Change-Id: I98291e2746e92e22672de077bccfb36ae91d2c62 --- diff --git a/includes/WebResponse.php b/includes/WebResponse.php index 90b76e3327..339b2e3ff0 100644 --- a/includes/WebResponse.php +++ b/includes/WebResponse.php @@ -39,7 +39,11 @@ class WebResponse { * @param null|int $http_response_code Forces the HTTP response code to the specified value. */ public function header( $string, $replace = true, $http_response_code = null ) { - header( $string, $replace, $http_response_code ); + if ( $http_response_code ) { + header( $string, $replace, $http_response_code ); + } else { + header( $string, $replace ); + } } /**