I'm trying to migrate from my old PHP 5.4.45 + Smarty 2.6.28 to my new PHP 7.2.25 + Smarty 3.1.33.
I'm tuning some small pieces of code, it works in most of webpages, but suddenly it stop working in some PHP pages, returning the following error message:
Notice: Undefined property: Smarty_Internal_Undefined::$objMap in /home/www/libs/Smarty-3.1.33/libs/sysplugins/smarty_internal_extension_handler.php on line 132
Fatal error: Uncaught --> Smarty: undefined extension class 'Smarty_Internal_Method_Get_Template_Vars' <-- thrown in /home/www/libs/Smarty-3.1.33/libs/sysplugins/smarty_internal_undefined.php on line 62
I can not figure out which PHP code is causing this error message, since I do not see within it any line position to analyze. It seems that the PHP code of these pages are very similar to the pages which work ok. I've read on the Internet that this error may be caused by 'register_object' in PHP. I've just checked my PHP files, and there is no 'register_object' within them.
In the not-working PHP pages (as in the working ones), additionally to the rest of the PHP operations, I do just:
$myTemplate = new Smarty();
$myTemplate->compile_dir = $mypath . "/templates_c";
$myTemplate->template_dir = $mypath . "/templates";
$myTemplate->assign("myvarible", $foo);
$myTemplate->display("mytemplate.html");
Any help is appreciated. Thank you very much.