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
* @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 );
+ }
}
/**