Workaround for bug causing fatal error during favoriting; Profile::getCurrentNotice() was returning an ArrayList instead of a Notice directly due to pulling through Profile::getNotices(). This caused failure in Fave::addNew() which specifies it wants a Notice. Caused failure of the 'fav' IM command.
This commit is contained in:
parent
6a6584741f
commit
4c09c1dc47
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user