Fatal error when the locale is set in config - CMSMS v.1.8.1

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
vilkis

Fatal error when the locale is set in config - CMSMS v.1.8.1

Post by vilkis »

Hi,
I get Fatal error: Using $this when not in object context in /srv/www/gelesinternetu.lt/public_html/lib/translation.functions.php on line 153 if I set locale in config.php

CMSMS v.1.8.1

If I replace all occurrences of $this by $gCms in translation.functions.php it solves the issue.

vilkis
vilkis

Re: Fatal error when the locale is set in config - CMSMS v.1.8.1

Post by vilkis »

I found why I get the error mentioned above. Normally, every module sets variable curlang and a function cms_current_language is never called. One of my modules reset variable curlang, so when a function cms_module_Lang is called it calls a function cms_current_language and then error occurs.

vilkis
Locked

Return to “CMSMS Core”