@@ -1406,7 +1406,7 @@ class BxBaseModGeneralModule extends BxDolModule
return false;
$oFavorite = BxDolFavorite::getObjectInstance($sSystem, $iId, true, $this->_oTemplate);
- if(!$oFavorite->isEnabled())
+ if(!$oFavorite || !$oFavorite->isEnabled())
return $oFavorite;
@@ -61,7 +61,7 @@ class BxBaseModGroupsSearchResult extends BxBaseModProfileSearchResult
$iProfileAuthor = $oProfileAuthor->id();
$oFavorite = $this->oModule->getObjectFavorite();
- if(!$oFavorite->isPublic() && $iProfileAuthor != bx_get_logged_profile_id())
+ if(!$oFavorite || (!$oFavorite->isPublic() && $iProfileAuthor != bx_get_logged_profile_id()))
$aConditions = $oFavorite->getConditionsTrack($CNF['TABLE_ENTRIES'], 'id', $iProfileAuthor);