Re: [SMARTY-DEV] Handling TRUE,FALSE,NULL,ON,OFF, etc
| From: | Andrei Zmievski | Date: | Wed, 07 Apr 2004 22:16:07 +0000 |
| Subject: | Re: [SMARTY-DEV] Handling TRUE,FALSE,NULL,ON,OFF, etc | ||
| References: | 1 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-2266@lists.php.net to get a copy of this message | ||
On Tue, 06 Apr 2004, Mark Rogers wrote:
> Consider:
> {blockfunc somevar=true othervar=TRUE}
> ..
> {/blockfunc}
>
> At present, $somevar will be set to boolean(TRUE) while $othervar gets set
> to string("TRUE"). (It's within a block function I came across this, I
> assume it affects other places too?)
>
> Clearly (??) this is wrong, and easy to fix in
> Smarty_Comiler::_parse_attrs() by making the two regexps case insensitive
> (case 2 of switch). Additionally, the check for "null" should accomodate
> "NULL".
Why? What is the predominant reason for wanting TRUE to resolve to
boolean? What is wrong with case-sensitivity?
- Andrei