Skip to content

Commit

Permalink
bug #1801 Fix variable names for the deprecation triggering code (stof)
Browse files Browse the repository at this point in the history
This PR was merged into the 1.x branch.

Discussion
----------

Fix variable names for the deprecation triggering code

Closes #1800

Commits
-------

dd446c0 Fix variable names for the deprecation triggering code
  • Loading branch information
fabpot committed Sep 1, 2015
2 parents 0a19aab + dd446c0 commit b1a4c14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Twig/ExpressionParser.php
Expand Up @@ -580,7 +580,7 @@ protected function getFunctionNodeClass($name, $line)

if ($function instanceof Twig_SimpleFunction && $function->isDeprecated()) {
$message = sprintf('Twig Function "%s" is deprecated', $function->getName());
if ($test->getAlternative()) {
if ($function->getAlternative()) {
$message .= sprintf('. Use "%s" instead', $function->getAlternative());
}
$message .= sprintf(' in %s at line %d.', $this->parser->getFilename(), $line);
Expand Down Expand Up @@ -610,7 +610,7 @@ protected function getFilterNodeClass($name, $line)

if ($filter instanceof Twig_SimpleFilter && $filter->isDeprecated()) {
$message = sprintf('Twig Filter "%s" is deprecated', $filter->getName());
if ($test->getAlternative()) {
if ($filter->getAlternative()) {
$message .= sprintf('. Use "%s" instead', $filter->getAlternative());
}
$message .= sprintf(' in %s at line %d.', $this->parser->getFilename(), $line);
Expand Down

0 comments on commit b1a4c14

Please sign in to comment.