• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed  Bug in XenForo_DataWriter_NewsFeed::_getExistingData()

xfrocks

Well-known member
#1
XenForo 1.0.1
File: library/XenForo/DataWriter/NewsFeed.php
Line 49

PHP:
protected function _getExistingData($data)
{
if (!$newsFeedId = $this->_getExistingPrimaryKey($data))
{
return false;
}

return array('xf_news_feed' => $this->_getNewsFeedModel()->getNewsFeedById($newsFeedId));
}
There is no method named getNewsFeedById in XenForo_Model_NewsFeed. Probably a typo, it should use XenForo_Model_NewsFeed::getNewsFeedItemById().

Note: getNewsFeedItemById() should use fetchRow() instead of fetchAll() like Mike said here http://xenforo.com/community/threads/fixed-typo-in-xenforo_model_newsfeed-getnewsfeeditembyid.15720/)