From 8033d7b94ff1dd4b3944bfdfe28fc65b3140237f Mon Sep 17 00:00:00 2001 From: Michael Lee Date: Tue, 21 Jul 2015 18:05:59 +0800 Subject: [PATCH] [components][expression_language] Fix the wrong constructor for SerializedParsedExpression There is a bug in the code snippet for creating a SerializedParsedExpression instance in chapter "Using Parsed and Serialized Expressions" | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | --- components/expression_language/caching.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/expression_language/caching.rst b/components/expression_language/caching.rst index f7de6fb9066..150bf265fbf 100644 --- a/components/expression_language/caching.rst +++ b/components/expression_language/caching.rst @@ -65,7 +65,7 @@ Both ``evaluate()`` and ``compile()`` can handle ``ParsedExpression`` and $expression = new SerializedParsedExpression( '1 + 4', - serialize($language->parse('1 + 4', array())) + serialize($language->parse('1 + 4', array())->getNodes()) ); echo $language->evaluate($expression); // prints 5