Cannot access protected property Content::$mHierarchyPath
Posted: Sun Jun 24, 2012 11:08 pm
Getting the following error when trying to use a UDT which worked in previous versions (1.9.4.1)
mod_fcgid: stderr: PHP Fatal error: Cannot access protected property Content::$mHierarchyPath in /xxx/xxx/public_html/lib/classes/class.usertagoperations.inc.php(265) : eval()'d code on line 4
UDT I'm trying to use:
Also tried cloning $op->mHierarchyPath, as well as $op->mHierarchyPath(). None worked. Any suggestions?
mod_fcgid: stderr: PHP Fatal error: Cannot access protected property Content::$mHierarchyPath in /xxx/xxx/public_html/lib/classes/class.usertagoperations.inc.php(265) : eval()'d code on line 4
UDT I'm trying to use:
Code: Select all
global $smarty;
$op = $smarty->get_template_vars('content_obj');
$current_id = $smarty->get_template_vars('content_id');
$temp = explode('/', $op->mHierarchyPath);
$root_alias = $temp[0];
$temp = explode('.', $op->mIdHierarchy);
$root_id = $temp[0];
if ($temp[0] == $current_id){
$is_root = 1;
$page_level = 1;
}
else{
$is_root = 0;
$page_level = array_search($current_id, $temp, true);
$page_level++;
}
$smarty->assign('language',$root_alias);