mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 11:27:00 +00:00
bug #1801 Fix variable names for the deprecation triggering code (stof)
This PR was merged into the 1.x branch.
Discussion
----------
Fix variable names for the deprecation triggering code
Closes https://github.com/twigphp/Twig/issues/1800
Commits
-------
dd446c0 Fix variable names for the deprecation triggering code
This commit is contained in:
@@ -580,7 +580,7 @@ class Twig_ExpressionParser
|
||||
|
||||
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);
|
||||
@@ -610,7 +610,7 @@ class Twig_ExpressionParser
|
||||
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user