|
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 |
gumshot Smarty n00b
Joined: 13 Feb 2014 Posts: 2
|
Posted: Tue Apr 01, 2014 2:40 pm Post subject: How to find unresolved variables? |
|
|
Hello,
i'm using several Smarty-Templates and have always the same problem: How to find out unresolved variabled. Sometimes they are simple mistyped, but sometimes they have no value. Now i use a syntax like
Code: | {$myvar|default:"**UNSET**"} |
to mark unresolved and after applying the template i grep for **UNSET**.
Is there a smarter, integrated way to do this? |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
|
Back to top |
|
gumshot Smarty n00b
Joined: 13 Feb 2014 Posts: 2
|
Posted: Wed Apr 23, 2014 10:05 am Post subject: |
|
|
I'm sorry but this does not help in any way. Error reporting is done to STDERR by default and thus will be written to a logfile in a webserver-context.
Shure, i could try to redirect this, but it will not only contain errors from smarty, but the whole webserer also
So, what i am looking for is a way to ask smarty if there where any compile-errors, and it should return with an array or such. |
|
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
|