Hello ppl,
I'll paste you a small code. So, is it me or the result is just odd !!!
This is the code:
The normal result should be:
But instead I have:
So, in this example, the length check of a non existing structure will erase the content if it's a string. Normally len should not impact the variable ... and .. here obviously it does. The workaround is (for me) to back-up the variable before the len check... but it's not very elegant :-)
So, was I coding too much and I cannot see anymore something obvious... or it's just a bug?
Thanks,
Claudiu
I'll paste you a small code. So, is it me or the result is just odd !!!
This is the code:
PHP Code:
<mvassign name="l.event" value="{'I\'m a string!'}">
<mveval expr="{'<pre>First occurrence: '$l.event$'</pre>'}">
<mvif expr="{len(l.event:obj) GT 0}">
<mvassign name="l.obj" value="{l.event:obj}">
<mvelseif expr="{len(l.event) GT 0}">
<mvassign name="l.obj" value="{'function(){'$l.event$'}'}">
<mvelse>
<mvassign name="l.obj" value="">
</mvif>
<mveval expr="{'<pre>Second occurrence: '$l.event$'</pre>'}">
HTML Code:
First occurrence: I'm a string! Second occurrence: I'm a string!
HTML Code:
First occurrence: I'm a string! Second occurrence:
So, was I coding too much and I cannot see anymore something obvious... or it's just a bug?
Thanks,
Claudiu
Comment