Permalink
Browse files

Merge pull request #248 from andrea-chris/patch-1

Check if there's a _route request attribute before getting it
  • Loading branch information...
2 parents 2c0342f + c2a3c30 commit 6083565911c5fbe21b0cb5058243bd560e8661af @havvg havvg committed Sep 25, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 Request/ParamConverter/PropelParamConverter.php
@@ -94,7 +94,7 @@ public function apply(Request $request, ConfigurationInterface $configuration)
$options = $configuration->getOptions();
// Check route options for converter options, if there are non provided.
- if (empty($options) && $this->router && $configuration instanceof ParamConverter) {
+ if (empty($options) && $request->attributes->has('_route') && $this->router && $configuration instanceof ParamConverter) {
$converterOption = $this->router->getRouteCollection()->get($request->attributes->get('_route'))->getOption('propel_converter');
if (!empty($converterOption[$configuration->getName()])) {
$options = $converterOption[$configuration->getName()];

0 comments on commit 6083565

Please sign in to comment.