From: Mikael Nordfeldth Date: Tue, 1 Oct 2013 15:43:46 +0000 (+0200) Subject: PHP Notice: Trying to get property of non-object X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3e15bab9657328008dac99b1a2d8e103227207bc;p=quix0rs-gnu-social.git 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 --- diff --git a/lib/inboxtagcloudsection.php b/lib/inboxtagcloudsection.php index 401983a9de..51424c5939 100644 --- a/lib/inboxtagcloudsection.php +++ b/lib/inboxtagcloudsection.php @@ -60,7 +60,8 @@ class InboxTagCloudSection extends TagCloudSection { $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);