Commit 4f47e8d
committed
minor #16865 Change recommended way to access array query string parameters (jontjs, Jon Green)
This PR was submitted for the 6.1 branch but it was merged into the 6.0 branch instead.
Discussion
----------
Change recommended way to access array query string parameters
`$request->query->all()['foo'];` triggers an 'Undefined array key "foo"' error when `foo` doesn't exist. However `$request->query->all('foo');` return null when `foo` doesn't exist (consistent with `$request->query->get('bar');` for accessing a string parameter `bar` which might not exist).
<!--
If your pull request fixes a BUG, use the oldest maintained branch that contains
the bug (see https://symfony.com/releases for the list of maintained branches).
If your pull request documents a NEW FEATURE, use the same Symfony branch where
the feature was introduced (and `6.x` for features of unreleased versions).
-->
Commits
-------
320a501 Update http_foundation.rst
29e1c0e Update http_foundation.rst1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
175 | 179 | | |
176 | 180 | | |
177 | 181 | | |
| |||
0 commit comments