Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Incorrect foreach tag shuts script down with no error

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
dave f
Smarty Rookie


Joined: 19 Sep 2003
Posts: 8

PostPosted: Mon Jan 19, 2004 3:32 pm    Post subject: Incorrect foreach tag shuts script down with no error Reply with quote

I was looking for the reason my script shuts down with no error after a $smarty->fetch command for a little while.
Well, I mesed up a foreach tag but I think smarty should comlpain about that shouldn't it?

That's what I did:
{foreach item=$data for=item}
...
instead of
{foreach from=$data item=item}
....

With that code my script shuts down without logging any error though I use error_reporting = E_ALL.
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Mon Jan 19, 2004 4:10 pm    Post subject: Reply with quote

my smarty gives me
"Fatal error: Smarty: [in file:...]: syntax error: missing 'from' attribute".

do you have display_errors and/or log_errors enabled?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dave f
Smarty Rookie


Joined: 19 Sep 2003
Posts: 8

PostPosted: Fri Jan 23, 2004 2:04 pm    Post subject: sorry.. Reply with quote

Sorry, the problem was my php config Embarassed .

I set error_reporting=E_ALL both in the server config and a htaccess file that caused the server to display no warnnings at all. Confused
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Fri Jan 23, 2004 2:18 pm    Post subject: Reply with quote

ah, nasty caveat. .htaccess doesn't know E_ALL but only 2047. i think i got cought by that also somewhen Smile.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    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