]> 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:01:35 +0000 (17:01 -0800)
classes/Profile.php

index 2ad302ccb8f80aab2a61ecffec8da5dc7f3ee352..88edf5cbb3c1d0912e4cd9b5d86f6b949f768be9 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;