From 3b209406629d8dd2954e08a4e0bd958506b4115e Mon Sep 17 00:00:00 2001 From: wmorancfi Date: Fri, 14 Oct 2011 14:52:01 -0300 Subject: [PATCH] Fix validation of constructor-passed pragmas --- Mustache.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Mustache.php b/Mustache.php index 022488b..7d909df 100644 --- a/Mustache.php +++ b/Mustache.php @@ -90,9 +90,9 @@ class Mustache { * // opening and closing delimiters, as an array or a space-separated string * 'delimiters' => '<% %>', * - * // an array of pragmas to enable + * // an array of pragmas to enable/disable * 'pragmas' => array( - * Mustache::PRAGMA_UNESCAPED + * Mustache::PRAGMA_UNESCAPED => true * ), * ); * @@ -132,7 +132,7 @@ class Mustache { } if (isset($options['pragmas'])) { - foreach ($options['pragmas'] as $pragma_name) { + foreach ($options['pragmas'] as $pragma_name => $pragma_value) { if (!in_array($pragma_name, $this->_pragmasImplemented)) { throw new MustacheException('Unknown pragma: ' . $pragma_name, MustacheException::UNKNOWN_PRAGMA); }