Skip to content

Commit

Permalink
Workaround for bug causing fatal error during favoriting; Profile::ge…
Browse files Browse the repository at this point in the history
…tCurrentNotice() 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.
  • Loading branch information
bvibber committed Mar 2, 2011
1 parent 6a65847 commit 4c09c1d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions classes/Profile.php
Expand Up @@ -186,6 +186,10 @@ function getCurrentNotice()
$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;
Expand Down

0 comments on commit 4c09c1d

Please sign in to comment.