Skip to content

Commit

Permalink
[components][expression_language] Fix the wrong constructor for
Browse files Browse the repository at this point in the history
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 |
  • Loading branch information
zerustech committed Jul 21, 2015
1 parent 747696a commit 8033d7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/expression_language/caching.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8033d7b

Please sign in to comment.