1. 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

Discussion in 'XenForo Development Discussions' started by liko881, Aug 19, 2013.

  1. liko881

    liko881 Member

    After upgrading to 1.2
    Began to leave a bug in the plugin:
    Fatal error: Unsupported operand types in
    Please look at what's needed to fix it:
    class LastPosts_Controller_Public extends XFCP_LastPosts_Controller_Public {
        public function 
    $response parent::actionIndex();
            if (
    $response instanceof XenForo_ControllerResponse_View)
    $xfPosts LastPosts_Model_PostList::getPostsArray();
    $response->params += array('xfPosts' => $xfPosts);
  2. Jeremy

    Jeremy Well-Known Member

  3. liko881

    liko881 Member

  4. Bob

    Bob Well-Known Member

    remove the brackets around $xfPosts

    $response->params['xfPosts'] = $xfPosts;
    Jeremy and liko881 like this.
  5. liko881

    liko881 Member

    Did not issue an error message but the last in the sidebar does not appear:(
    No such plug-in for xenforo 1.2 to the latest posts show up in the sidebar ?
  6. Jeremy

    Jeremy Well-Known Member

    We would have to see some more code to help you figure out what's wrong.
  7. xf_phantom

    xf_phantom Well-Known Member

    liko881 likes this.
  8. Bob

    Bob Well-Known Member

    my guess is that your listener is extending XenForo_ControllerPublic_Index and needs to be changed to XenForo_ControllerPublic_Forum
    BlueSquares and HWS like this.
  9. BlueSquares

    BlueSquares Member

    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!
    Bob likes this.

Share This Page