Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Php notice with !empty and unassigned variable

 
Post new topic   Reply to topic    Smarty Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
P@t
Smarty Rookie


Joined: 05 Dec 2010
Posts: 6

PostPosted: Sun Dec 05, 2010 9:40 pm    Post subject: Php notice with !empty and unassigned variable Reply with quote

Hi,

Sometimes, I test my variables with !empty (instead of isset). It work fine with smarty 2, but I have php notice with smarty 3 when variable doesn't exist. Is it bug?

Example:
Code:
{if !empty($my_varible)}{$my_variable}{/if}
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5067
Location: Hamburg / Germany

PostPosted: Sun Dec 05, 2010 10:16 pm    Post subject: Reply with quote

This was a bug. It's fixed in the SVN trunk now.
Back to top
View user's profile Send private message
P@t
Smarty Rookie


Joined: 05 Dec 2010
Posts: 6

PostPosted: Sun Dec 05, 2010 10:38 pm    Post subject: Reply with quote

Thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Bugs All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP