]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
PHP Notice: Trying to get property of non-object
authorMikael Nordfeldth <mmn@hethane.se>
Tue, 1 Oct 2013 15:43:46 +0000 (17:43 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Tue, 1 Oct 2013 15:43:46 +0000 (17:43 +0200)
The notice was reported in /srv/www/vhosts/se/umeahackerspace/social/%/htdocs/lib/inboxtagcloudsection.php on line 63

lib/inboxtagcloudsection.php

index 401983a9ded170c813af3a6e26016d6f4b69ae0a..51424c5939e24a1c64623db1d198fee94ba5c5b8 100644 (file)
@@ -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);