Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Check if there's a _route request attribute before getting it #248

Merged
merged 1 commit into from

2 participants

@andrea-chris

Apparently Symfony doesn't add a _route parameter to subrequests (esi render call) so PropelParamConverter throw an error accessing getOption method on not-existent object on line 98.

@andrea-chris andrea-chris Check if there's a _route request attribute before getting it
Apparently Symfony doesn't add a _route parameter to subrequests (esi render call) so PropelParamConverter throw an error accessing getOption method on not-existent object on line 98.
c2a3c30
@havvg havvg merged commit 6083565 into from
@havvg
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 25, 2013
  1. @andrea-chris

    Check if there's a _route request attribute before getting it

    andrea-chris authored
    Apparently Symfony doesn't add a _route parameter to subrequests (esi render call) so PropelParamConverter throw an error accessing getOption method on not-existent object on line 98.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  Request/ParamConverter/PropelParamConverter.php
View
2  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()];
Something went wrong with that request. Please try again.