prepared the 1.23.1 release

This commit is contained in:
Fabien Potencier
2015-11-05 13:49:06 +01:00
parent e4bedf07d8
commit d9b6333ae8
2 changed files with 14 additions and 10 deletions
+1 -1
View File
@@ -15,7 +15,7 @@
#ifndef PHP_TWIG_H
#define PHP_TWIG_H
#define PHP_TWIG_VERSION "1.23.1-DEV"
#define PHP_TWIG_VERSION "1.23.1"
#include "php.h"
+13 -9
View File
@@ -16,7 +16,7 @@
*/
class Twig_Environment
{
const VERSION = '1.23.1-DEV';
const VERSION = '1.23.1';
protected $charset;
protected $loader;
@@ -961,11 +961,13 @@ class Twig_Environment
foreach ($this->filters as $pattern => $filter) {
$pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count);
if ($count && preg_match('#^'.$pattern.'$#', $name, $matches)) {
array_shift($matches);
$filter->setArguments($matches);
if ($count) {
if (preg_match('#^'.$pattern.'$#', $name, $matches)) {
array_shift($matches);
$filter->setArguments($matches);
return $filter;
return $filter;
}
}
}
@@ -1110,11 +1112,13 @@ class Twig_Environment
foreach ($this->functions as $pattern => $function) {
$pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count);
if ($count && preg_match('#^'.$pattern.'$#', $name, $matches)) {
array_shift($matches);
$function->setArguments($matches);
if ($count) {
if (preg_match('#^'.$pattern.'$#', $name, $matches)) {
array_shift($matches);
$function->setArguments($matches);
return $function;
return $function;
}
}
}