Re: [SMARTY-DEV] Parser problem with {if...} ?
| From: | Matthew Hagerty | Date: | Thu, 26 Dec 2002 19:02:55 +0000 |
| Subject: | Re: [SMARTY-DEV] Parser problem with {if...} ? | ||
| References: | 1 2 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-494@lists.php.net to get a copy of this message | ||
Thanks for the fix, it's very much appreciated!
Matthew
> That's a bug in the parser, it doesn't like the space in the modifier
> argument. The latest CVS works fine but I wouldn't trust that in
> production yet. You're better off working around it:
>
> {assign var="start_date" value=$aItem.start_date|date_format:"%B %Y"}
> {if $start_date ne $monthyear}
> ...
>
>
> On Thu, 2002-12-26 at 12:36, Matthew Hagerty wrote:
>> Greetings,
>>
>> I have the following {if...} in my template:
>>
>> {if $aItem.start_date|date_format:"%B %Y" ne $monthyear}
>>
>> And this is what gets generated:
>>
>> <?php if ($this->_run_mod_handler('date_format', true,
>> $this->_tpl_vars['aItem']['start_date'], "%B) %Y" !=
>> $this->_tpl_vars['monthyear']): ?>
>>
>> Notice the close paren *in* the date format string instead of after it.
>> Any idea what might be causing this? I'm running Smarty 2.3.1 on Apache
>> 1.3.27/FreeBSD 4.7 and IIS/NT 4.somthing, both servers give the error.
>> Removing the space between the %B and %Y prevents the error but does not
>> generate the desired output.
>>
>> I can provide the complete template if necessary.
>>
>> Thanks,
>> Matthew
> --
> Monte Ohrt <monte@ispi.net>
>
>
> --
> Smarty Development Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>