|
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 |
pedrotester Smarty Regular
Joined: 06 Jun 2019 Posts: 40
|
Posted: Thu Mar 11, 2021 10:42 pm Post subject: Editing modifierdefault changes nothing, it's like magic |
|
|
Hello,
Why when I edit this plugin, it does nothing at all: modifiercompiler.default.php
I change the last line to:
Code: | return $output . "lllllllllllllllllll";
|
Then in my tpl I use {$test|default:"hoho"}
Result: "hoho" is displayed, and not "hohollllllllllllllllllllllllll"
I tried to delete the entire code from the plugin too, and same result, no error...
Note: I'm trying to understand why I have the same issue as this guy https://www.smarty.net/forums/viewtopic.php?t=19439 and can't figure it out, that's why I'm testing all of this. EDIT: i found the solution, it's because i use a custom error handler which doesn't verify if the @$var must be ignored or not cf: https://stackoverflow.com/questions/6610441/error-control-operator-not-working
Last edited by pedrotester on Thu Mar 11, 2021 11:49 pm; edited 1 time in total |
|
Back to top |
|
pedrotester Smarty Regular
Joined: 06 Jun 2019 Posts: 40
|
Posted: Thu Mar 11, 2021 11:10 pm Post subject: |
|
|
Ok, I think I figured it out, it's because I have to delete the "compile" directory first (the previously compiled tpl)
But then, how to force recompiling each time I load the page? |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Wed Mar 17, 2021 12:20 pm Post subject: |
|
|
Read the documentation?
Code: | $smarty->setForceCompile(true); |
|
|
Back to top |
|
pedrotester Smarty Regular
Joined: 06 Jun 2019 Posts: 40
|
Posted: Wed Mar 17, 2021 9:31 pm Post subject: |
|
|
thank you bro |
|
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
|