Commit 5cfa54fc authored by Fabien Potencier's avatar Fabien Potencier

merged branch willdurand/patch-1 (PR #559)

This PR was merged into the master branch.

Commits
-------

97d15149 getFormat() => getRequestFormat()

Discussion
----------

getFormat() => getRequestFormat()

The `getFormat()` method is not the one used to get the request format.
parents 99ab5eb9 97d15149
......@@ -51,7 +51,7 @@ The ``SerializerServiceProvider`` provider provides a ``serializer`` service:
// assume a page_repository service exists that returns Page objects. The
// object returned has getters and setters exposing the state.
$page = $app['page_repository']->find($id);
$format = $app['request']->getFormat();
$format = $app['request']->getRequestFormat();
if (!$page instanceof Page) {
$app->abort("No page found for id: $id");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment