|
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 |
ermorela Smarty n00b
Joined: 04 Nov 2015 Posts: 4
|
Posted: Thu Dec 03, 2015 9:07 am Post subject: Fatal error: Call to undefined function |
|
|
Hi all, I'm facing a silly problem when inserting a new call to a function in my logic. System returns Fatal error: Call to undefined function test().
The php page is:
Code: |
function getEntries($val) {
$val = test($val);
$array = explode(PHP_EOL, implode($val));
$this->tpl->assign('array', $array);
$this->tpl->display('viewrecord.tpl');
}
|
That is a dummy function for test purposes.
If I remove the line $val = test($val); everything works.
Obviously the function is present in the same file
I tried to operate on constructor cache configuration but nothing happens:
Code: |
class correctRecord_Smarty extends Smarty {
function __construct() {
parent::__construct();
$this->clearCompiledTemplate();
$this->compile_check = true;
$this->force_compile = true;
$this->setTemplateDir(SEMANTIC_DIR . 'templates');
$this->setCompileDir(SEMANTIC_DIR . 'templates_c');
$this->setConfigDir(SEMANTIC_DIR . 'configs');
$this->setCacheDir(SEMANTIC_DIR . 'cache');
}
|
some hints?
Thanks in advance |
|
Back to top |
|
ermorela Smarty n00b
Joined: 04 Nov 2015 Posts: 4
|
Posted: Thu Dec 03, 2015 9:57 am Post subject: |
|
|
such a stupid....
$this is missing
$val = $this->test($val); |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Thu Dec 03, 2015 11:37 am Post subject: |
|
|
Happens to the best of us…
But real problem is $this->tpl->assign(); |
|
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
|