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

Fatal error: Call to undefined function

 
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 -> General
View previous topic :: View next topic  
Author Message
ermorela
Smarty n00b


Joined: 04 Nov 2015
Posts: 4

PostPosted: Thu Dec 03, 2015 9:07 am    Post subject: Fatal error: Call to undefined function Reply with quote

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
View user's profile Send private message
ermorela
Smarty n00b


Joined: 04 Nov 2015
Posts: 4

PostPosted: Thu Dec 03, 2015 9:57 am    Post subject: Reply with quote

such a stupid....
$this is missing

$val = $this->test($val);
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Thu Dec 03, 2015 11:37 am    Post subject: Reply with quote

Happens to the best of us…
But real problem is $this->tpl->assign();
Back to top
View user's profile Send private message
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 -> General 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