Re: [SMARTY] Error in IF expression parser
| From: | messju mohr | Date: | Sat, 19 Apr 2003 10:19:23 +0000 |
| Subject: | Re: [SMARTY] Error in IF expression parser | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9333@lists.php.net to get a copy of this message | ||
hello,
On Wed, Apr 16, 2003 at 04:06:46PM +0200, Petr Weissar wrote:
> Hallo,
>
> i'm using hexadecimal numbers in {if ...}{/if} statement in template.
> >From version 2.4.x (i think) are these numbers bad parsed.
yes, the parser got more restrictive with 2.4.x .
> File: Smarty_Compiler.class.php
> Function: _compile_if_tag($tag_args, $elseif = false)
>
> The regular expression must include string "\d+x" (information from my
> friend) ....
it's not that simple, but in principle: yes. i just added this to the
cvs-version.
you can use hex-constants now:
- in if-statements (as you pointed out)
- as function-attributes
- as modifier-parameters
to make it 100% i still must check function.math.php, but please test
it if it works for you now.
the syntax follows suite of php's hex-constants, that is:
0xabc is allowed
-0xabc is allowed, but
0xabc.123 (floating-point values) are not allowed
i hope this works for you all.
greetings
messju
> Now must i repair it again in 2.5.0 .... Can be this adjustments
> included in a new version of Smarty ? (though great software !!! :-)) ).
>
> Regards,
> Petr Weissar
>
> P.S. Sorry for bad English :-((
no problem for me. i'm very bad at that sometimes, too. i don't know
what the rest of the list thinks about it, though... :)