mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-15 20:06:31 +00:00
fixed optimizer max value
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
* 1.15.0 (2013-XX-XX)
|
||||
|
||||
* fixed a bug that prevented the optimizers to be enabled/disabled selectively
|
||||
* fixed first and last filters for UTF-8 strings
|
||||
* added a source function to include the content of a template without rendering it
|
||||
* fixed the C extension sandbox behavior when get or set is prepend to method name
|
||||
|
||||
@@ -39,7 +39,7 @@ class Twig_NodeVisitor_Optimizer implements Twig_NodeVisitorInterface
|
||||
*/
|
||||
public function __construct($optimizers = -1)
|
||||
{
|
||||
if (!is_int($optimizers) || $optimizers > 2) {
|
||||
if (!is_int($optimizers) || $optimizers > (self::OPTIMIZE_FOR | self::OPTIMIZE_RAW_FILTER | self::OPTIMIZE_VAR_ACCESS)) {
|
||||
throw new InvalidArgumentException(sprintf('Optimizer mode "%s" is not valid.', $optimizers));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user