Skip to content

Commit

Permalink
Merge pull request #145 from FriendsOfSymfony/fix-expressionlanguage-…
Browse files Browse the repository at this point in the history
…dependency

fix expression language dependency to only use with expressions
  • Loading branch information
stof committed Aug 19, 2014
2 parents 0db55d8 + 76cd62b commit e21bd91
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions EventListener/InvalidationSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ private function invalidateRoutes(array $routes, Request $request)
$values = $request->attributes->all();
// if there is an attribute called "request", it needs to be accessed through the request.
$values['request'] = $request;
$expressionLanguage = $this->getExpressionLanguage();

foreach ($routes as $route) {
$params = array();
Expand All @@ -214,7 +213,7 @@ private function invalidateRoutes(array $routes, Request $request)
// Iterate over route params and try to evaluate their values
foreach ($route->getParams() as $key => $value) {
if (is_array($value)) {
$value = $expressionLanguage->evaluate($value['expression'], $values);
$value = $this->getExpressionLanguage()->evaluate($value['expression'], $values);
}

$params[$key] = $value;
Expand Down

0 comments on commit e21bd91

Please sign in to comment.