Re: function.eval doesn't work in PHP 5
| From: | Pete Morganic | Date: | Fri, 11 Jul 2003 10:36:36 +0000 |
| Subject: | Re: function.eval doesn't work in PHP 5 | ||
| References: | 1 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-1720@lists.php.net to get a copy of this message | ||
hi ..
How would I go about creating a yesno modifier based on the Trenary operator. The point I get stuck on is the way to handle the condition in the function.
Here's the way the code could work, in this example I want to change the name of the style class
<a href="smarty.php.net"
class="{yesno|$this == $that:"highlight":"nohightlight"}">
I know I can use the {if} construct, its just a suggestion...
regards
pete
Greg Beaver wrote:
Hi, phpDocumentor uses Smarty 2.5.0 and {eval} in the HTML:Smarty:* templates. We've found with the recent release of php 5 beta 1, that eval triggers a fatal error of $this used out of context. Where should I report this bug aside from here? Regards, Greg