|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
dave f Smarty Rookie
Joined: 19 Sep 2003 Posts: 8
|
Posted: Mon Jan 19, 2004 3:32 pm Post subject: Incorrect foreach tag shuts script down with no error |
|
|
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 |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Mon Jan 19, 2004 4:10 pm Post subject: |
|
|
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 |
|
dave f Smarty Rookie
Joined: 19 Sep 2003 Posts: 8
|
Posted: Fri Jan 23, 2004 2:04 pm Post subject: sorry.. |
|
|
Sorry, the problem was my php config .
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. |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Fri Jan 23, 2004 2:18 pm Post subject: |
|
|
ah, nasty caveat. .htaccess doesn't know E_ALL but only 2047. i think i got cought by that also somewhen . |
|
Back to top |
|
|
|
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
|