Skip to content

Commit 8b611e2

Browse files
committed
bug #4598 [ExpressionLanguage] add missing argument (xabbuh)
This PR was merged into the 2.5 branch. Discussion ---------- [ExpressionLanguage] add missing argument | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 2.5+ | Fixed tickets | #4578 Commits ------- 4801a3c [ExpressionLanguage] add missing argument
2 parents 815e0bf + 4801a3c commit 8b611e2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

components/expression_language/caching.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ Using Parsed and Serialized Expressions
5151
Both ``evaluate()`` and ``compile()`` can handle ``ParsedExpression`` and
5252
``SerializedParsedExpression``::
5353

54-
use Symfony\Component\ExpressionLanguage\ParsedExpression;
5554
// ...
5655

57-
$expression = new ParsedExpression($language->parse('1 + 4'));
56+
// the parse() method returns a ParsedExpression
57+
$expression = $language->parse('1 + 4', array());
5858

5959
echo $language->evaluate($expression); // prints 5
6060

@@ -64,7 +64,7 @@ Both ``evaluate()`` and ``compile()`` can handle ``ParsedExpression`` and
6464
// ...
6565
6666
$expression = new SerializedParsedExpression(
67-
serialize($language->parse('1 + 4'))
67+
serialize($language->parse('1 + 4', array()))
6868
);
6969
7070
echo $language->evaluate($expression); // prints 5

0 commit comments

Comments
 (0)