diff options
| author | Susan Tan <onceuponatimeforever@gmail.com> | 2013-10-14 22:15:13 -0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-06-05 15:41:56 -0400 |
| commit | 484f3edf1e79388f73dcb07e39d79d0c5029ae9e (patch) | |
| tree | 0b2ec38c385a9aa697b3d8cc8986264997d03604 /docs/ref | |
| parent | 84cafc2b3575fe1040c5ed98d3f82d3b42d606f7 (diff) | |
Fixed #18400 -- Modified length template filter to return 0 for unknown variables.
Thanks Florian for the bug report, luyikei for the initial code patch, and
Bouke for the code review feedback.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/templates/builtins.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index 9d4093e4da..e66c583720 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -1688,6 +1688,11 @@ For example:: If ``value`` is ``['a', 'b', 'c', 'd']`` or ``"abcd"``, the output will be ``4``. +.. versionchanged:: 1.8 + + The filter returns ``0`` for an undefined variable. Previously, it returned + an empty string. + .. templatefilter:: length_is length_is |
