You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@freemarker.apache.org by dd...@apache.org on 2019/08/01 19:56:35 UTC

[freemarker] 03/03: Added missing change log entry for the new fallback_on_null_loop_variable configuration setting.

This is an automated email from the ASF dual-hosted git repository.

ddekany pushed a commit to branch 2.3-gae
in repository https://gitbox.apache.org/repos/asf/freemarker.git

commit 522747bec7d37fbdcd860a501f116a1a363e1608
Author: ddekany <dd...@apache.org>
AuthorDate: Thu Aug 1 21:49:07 2019 +0200

    Added missing change log entry for the new fallback_on_null_loop_variable configuration setting.
---
 src/manual/en_US/book.xml | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/src/manual/en_US/book.xml b/src/manual/en_US/book.xml
index ec49d8e..017e7c0 100644
--- a/src/manual/en_US/book.xml
+++ b/src/manual/en_US/book.xml
@@ -28006,6 +28006,23 @@ TemplateModel x = env.getVariable("x");  // get variable x</programlisting>
             </listitem>
 
             <listitem>
+              <para>New configuration setting,
+              <literal>fallback_on_null_loop_variable</literal>: Specifies the
+              behavior when reading a loop variable (like <literal>i</literal>
+              in <literal>&lt;#list items as i&gt;</literal>, or in
+              <literal>&lt;@myMacro items; i&gt;</literal>) that's
+              <literal>null</literal> (missing); if <literal>true</literal>,
+              FreeMarker will look for a variable with the same name in higher
+              variable scopes, or if <literal>false</literal> the variable
+              will be simply <literal>null</literal> (missing). For backward
+              compatibility the default is <literal>true</literal>. The
+              recommended value for new projects is <literal>false</literal>,
+              as otherwise adding new variables to higher scopes (typically to
+              the data-model) can unintentionally change the behavior of
+              templates.</para>
+            </listitem>
+
+            <listitem>
               <para>If the result of
               <literal><replaceable>seq</replaceable>?size</literal> is
               compared to an integer literal in a template, like in