Skip to content

Commit

Permalink
Merge branch '3.4' into 4.1
Browse files Browse the repository at this point in the history
* 3.4:
  Change button_widget class to btn-primary
  [Dotenv] dont use getenv() to read SYMFONY_DOTENV_VARS
  [HttpFoundation] Fixed PHP doc of ParameterBag::getBoolean
  [HttpFoundation] replace any preexisting Content-Type headers
  • Loading branch information
nicolas-grekas committed Nov 8, 2018
2 parents 2e76552 + 0ed0c41 commit 909a9da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ParameterBag.php
Expand Up @@ -174,7 +174,7 @@ public function getInt($key, $default = 0)
* Returns the parameter value converted to boolean.
*
* @param string $key The parameter key
* @param mixed $default The default value if the parameter key does not exist
* @param bool $default The default value if the parameter key does not exist
*
* @return bool The filtered value
*/
Expand Down
3 changes: 2 additions & 1 deletion Response.php
Expand Up @@ -330,8 +330,9 @@ public function sendHeaders()

// headers
foreach ($this->headers->allPreserveCaseWithoutCookies() as $name => $values) {
$replace = 0 === strcasecmp($name, 'Content-Type');
foreach ($values as $value) {
header($name.': '.$value, false, $this->statusCode);
header($name.': '.$value, $replace, $this->statusCode);
}
}

Expand Down

0 comments on commit 909a9da

Please sign in to comment.