Skip to content

Commit

Permalink
bug #33431 Casting getInt to integer (bits4breakfast)
Browse files Browse the repository at this point in the history
This PR was squashed before being merged into the 5.0-dev branch (closes #33431).

Discussion
----------

Casting getInt to integer

| Q             | A
| ------------- | ---
| Branch?       | 4.4 for features / 3.4 or 4.3 for bug fixes <!-- see below -->
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| License       | MIT

Until two months ago (until here ead419b ) getInt was casting the returned value to integer however this was removed.

Commits
-------

68e9202 Casting getInt to integer
  • Loading branch information
nicolas-grekas committed Sep 2, 2019
2 parents 7a5b1b6 + 68e9202 commit 4a32a98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/HttpFoundation/ParameterBag.php
Expand Up @@ -142,7 +142,7 @@ public function getDigits(string $key, string $default = '')
*/
public function getInt(string $key, int $default = 0)
{
return $this->get($key, $default);
return (int) $this->get($key, $default);
}

/**
Expand Down

0 comments on commit 4a32a98

Please sign in to comment.