forked from GNUsocial/gnu-social
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
8cacecb6dc
commit
d09aa9c947
@ -186,6 +186,10 @@ class Profile extends Memcached_DataObject
|
|||||||
$notice = $this->getNotices(0, 1);
|
$notice = $this->getNotices(0, 1);
|
||||||
|
|
||||||
if ($notice->fetch()) {
|
if ($notice->fetch()) {
|
||||||
|
if ($notice instanceof ArrayWrapper) {
|
||||||
|
// hack for things trying to work with single notices
|
||||||
|
return $notice->_items[0];
|
||||||
|
}
|
||||||
return $notice;
|
return $notice;
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user