Weird behavior or bug?

Author Message

Massimiliano Bariola

Thursday 04 August 2005 4:16:15 am

    {def $dataodierna = gettime(currentdate())}
    {def $nextmonth = $dataodierna.month}
    {def $nextyear = $dataodierna.year}
    {if $dataodierna.month|eq(12)}
        {set $nextmonth = 1}
        {set $nextyear = $nextyear|inc(1)}
    {else}
        {set $nextmonth = $nextmonth|inc(1)}
    {/if}
    {if $dataodierna.month|count_chars|eq(1)}
{*the following line results in an error*}
        {set $dataodierna.month = concat('0', $dataodierna.month)}
    {/if}
    {if $nextmonth|count_chars|eq(1)}
        {set $nextmonth = concat('0', $nextmonth)}
    {/if}

the above snippet of tpl-code gives this error:

parser error @ extension/wt/design/standard/templates/wt/classifiche.tpl:69
Empty variable name at [.month = concat('0', $dataodierna.month)]

which seems pretty weird to me, because $dataodierna does exist (I use it elsewhere in my code to set other values, which get correctly set).

Bug or my mistake ?

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.