]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Workaround for bug causing fatal error during favoriting; Profile::getCurrentNotice...
authorBrion Vibber <brion@pobox.com>
Wed, 2 Mar 2011 01:01:35 +0000 (17:01 -0800)
committerBrion Vibber <brion@pobox.com>
Wed, 2 Mar 2011 01:04:05 +0000 (17:04 -0800)
classes/Profile.php

index fd41c6139aaf884d1daf1f63ed741b861c08355f..d030e38b1b5c86866a7f3372a53a7088ea277c7e 100644 (file)
@@ -186,6 +186,10 @@ class Profile extends Memcached_DataObject
         $notice = $this->getNotices(0, 1);
 
         if ($notice->fetch()) {
+            if ($notice instanceof ArrayWrapper) {
+                // hack for things trying to work with single notices
+                return $notice->_items[0];
+            }
             return $notice;
         } else {
             return null;