Bartosz Dziewoński has submitted this change and it was merged.

Change subject: Fix to incorrect calls of header () breaking saving some pages 
and login
......................................................................


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
---
M includes/WebResponse.php
1 file changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/WebResponse.php b/includes/WebResponse.php
index 90b76e3..339b2e3 100644
--- a/includes/WebResponse.php
+++ b/includes/WebResponse.php
@@ -39,7 +39,11 @@
         * @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 );
+               }
        }
 
        /**

-- 
To view, visit https://gerrit.wikimedia.org/r/302430
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I98291e2746e92e22672de077bccfb36ae91d2c62
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Alexander I. Mashin <alex.mas...@gmail.com>
Gerrit-Reviewer: Bartosz Dziewoński <matma....@gmail.com>
Gerrit-Reviewer: Daniel Kinzler <daniel.kinz...@wikimedia.de>
Gerrit-Reviewer: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to