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

Fatal Error: Unsupported operand types

#1
After upgrading to 1.2
Began to leave a bug in the plugin:
Fatal error: Unsupported operand types in
/home/liferf.com/public_html/library/LastPosts/Controller/Public.php on line 22
Please look at what's needed to fix it:
PHP:
<?php
class LastPosts_Controller_Public extends XFCP_LastPosts_Controller_Public {
    public function actionIndex()
    {
        $response = parent::actionIndex();
      
        if ($response instanceof XenForo_ControllerResponse_View)
        {
            $xfPosts = LastPosts_Model_PostList::getPostsArray();
        }
      
        $response->params += array('xfPosts' => $xfPosts);
      
        return $response;
    }
}
?>
 
#9
my guess is that your listener is extending XenForo_ControllerPublic_Index and needs to be changed to XenForo_ControllerPublic_Forum
I hate to bump old threads, but your comment fixed my problem with Xen-tr.com Top Poster 1.1.0 in version 1.2.1. I changed the recommended call in "/public_html/forum/library/XenTrCom/TopPoster/Listener" and it's working now. Thank you very much!