Skip to content

Commit

Permalink
Fixing exception in case of invalid POST body.
Browse files Browse the repository at this point in the history
  • Loading branch information
fubhy committed Oct 24, 2017
1 parent 814a4f5 commit f9d35ce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Routing/QueryRouteEnhancer.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ protected function filterRequestValues(Request $request, callable $filter) {
$content = $request->getContent();

$values = !empty($content) ? json_decode($content, TRUE) : $request->query->all();
$values = !empty($values) ? $values : [];

// PHP 5.5.x does not yet support the ARRAY_FILTER_USE_KEYS constant.
$keys = array_filter(array_keys($values), $filter);
Expand Down

0 comments on commit f9d35ce

Please sign in to comment.