[TYPO3-project-formidable] Wierd behavior userobj call

Jerome Schneider j.schneider at ameos.com
Mon Jun 11 15:51:16 CEST 2007


Hello manuel,

This is a nice bug :D
It seems that switch(0) unexpectedly returns true when compared with a 
string, and this had consequences on (obsolete) function 
tx_mainrenderlet::_substituteConstants(), which returned time() in that case

I corrected this on the SVN
Thank you,
Jerome Schneider


Manuel Rego Casasnovas a écrit :
> Hi.
> 
> I've solve this problem return a string instead of an integer in my
> function:
> 
>     function _getCode() {
>         return '0';
>     }
> 
> Bye,
>    Rego
> 
> --
>    http://www.igalia.com
> 
> 
> Manuel Rego Casasnovas escribió:
>> Hello everyone.
>>
>> I have a TXT renderlet with the next code:
>>         <renderlet:TEXT name="code">
>>             <data>
>>                 <value>
>>                     <userobj>
>>                         <extension>this</extension>
>>                         <method>_getCode</method>
>>                     </userobj>
>>                 </value>
>>             </data>
>>         </renderlet:TEXT>
>>
>> And in my function _getCode return always 0 (it's a test):
>>     function _getCode() {
>>         return 0;
>>     }
>>
>> If I show this renderlet in my template:
>> Code: {code}
>>
>> I get the next result:
>> Code: 1181290388
>>
>> I think that 1181290388 is the current timestamp.
>>
>> However the expected result would be:
>> Code: 0
>>
>> I don't know if this is the expected behavior or no.
>>
>> Best regards,
>>    Rego
>>
>> --
>> http://www.igalia.com
>> _______________________________________________
>> TYPO3-project-formidable mailing list
>> TYPO3-project-formidable at lists.netfielders.de
>> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-formidable
>>
>>   


More information about the TYPO3-project-formidable mailing list