PHP Notice: Trying to get property of non-object

The notice was reported in /srv/www/vhosts/se/umeahackerspace/social/%/htdocs/lib/inboxtagcloudsection.php on line 63
This commit is contained in:
Mikael Nordfeldth 2013-10-01 17:43:46 +02:00
parent 1d46ca45d1
commit 3e15bab965

View File

@ -60,7 +60,8 @@ class InboxTagCloudSection extends TagCloudSection
{ {
$profile = Profile::current(); $profile = Profile::current();
$keypart = sprintf('Inbox:notice_tag:%d:%d', $this->user->id, $profile->id); $keypart = sprintf('Inbox:notice_tag:%d:%d', $this->user->id,
$profile instanceof Profile ? $profile->id : 0);
$tag = Memcached_DataObject::cacheGet($keypart); $tag = Memcached_DataObject::cacheGet($keypart);