Skip to content

Commit 9e9cb26

Browse files
committed
Merge branch '6.1' into 6.2
* 6.1: Update http_foundation.rst
2 parents 5f60dd0 + 2228e49 commit 9e9cb26

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

components/http_foundation.rst

+5-1
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,13 @@ doesn't support returning arrays, so you need to use the following code::
169169
// the query string is '?foo[bar]=baz'
170170

171171
// don't use $request->query->get('foo'); use the following instead:
172-
$request->query->all()['foo'];
172+
$request->query->all('foo');
173173
// returns ['bar' => 'baz']
174174

175+
// if the requested parameter does not exist, an empty array is returned:
176+
$request->query->all('qux');
177+
// returns []
178+
175179
$request->query->get('foo[bar]');
176180
// returns null
177181

0 commit comments

Comments
 (0)