I have upgraded an old install to version 1.12.1 "Rontiki" and after finally getting TinyMCE to work by changing the settings for the module so that it uses a static config file I have run into another issue.
When editing a page and browsing for an image this error appears and I don't know how to fix it.
Warning: Creating default object from empty value in /home/******/public_html/modules/TinyMCE/filepicker.php on line 14
Fatal error: Call to undefined method stdClass::GetPreference() in /home/******/public_html/modules/TinyMCE/filepicker.php on line 15
The code looks like this:
Code: Select all
$CMS_ADMIN_PAGE=1;
$path = dirname(dirname(dirname(__FILE__)));
require_once($path . DIRECTORY_SEPARATOR . 'include.php');
$urlext = get_secure_param();
check_login();
$userid = get_userid();
$config=&$gCms->GetConfig();
$modules =&$gCms->modules;
$tiny=$modules["TinyMCE"]['object'];
$tiny->curlang=get_preference($userid, 'default_cms_language');
$filepickerstyle=$tiny->GetPreference("filepickerstyle","both");
$tiny->smarty->assign("filepickerstyle",$filepickerstyle);
$tiny->smarty->assign("rooturl",$config["root_url"]);
$tiny->smarty->assign("admindir",$config["admin_dir"]);
$tiny->smarty->assign("filepickertitle",$tiny->Lang("filepickertitle"));
$tiny->smarty->assign("youareintext",$tiny->Lang("youareintext"));