Index: trunk/kernel/include/item.php =================================================================== diff -u -r1347 -r2687 --- trunk/kernel/include/item.php (.../item.php) (revision 1347) +++ trunk/kernel/include/item.php (.../item.php) (revision 2687) @@ -594,7 +594,11 @@ global $objSession, $objFavorites; $res = FALSE; - if($objSession->HasCatPermission("FAVORITES", $this->GetPrimaryCategory() )) + + // user can be added to favorites, but they have no primary category :) + $category_id = method_exists($this, 'GetPrimaryCategory') ? $this->GetPrimaryCategory() : $GLOBALS['m_var_list']['cat']; + + if( $objSession->HasCatPermission("FAVORITES", $category_id) ) { if(!$PortalUserId) $PortalUserId = $objSession->Get("PortalUserId"); @@ -613,7 +617,10 @@ $res = FALSE; - if($objSession->HasCatPermission("FAVORITES", $this->GetPrimaryCategory())) + // user can be added to favorites, but they have no primary category :) + $category_id = method_exists($this, 'GetPrimaryCategory') ? $this->GetPrimaryCategory() : $GLOBALS['m_var_list']['cat']; + + if( $objSession->HasCatPermission("FAVORITES", $category_id) ) { if(!$PortalUserId) $PortalUserId = $objSession->Get("PortalUserId");