Jump to content
  • 4 pages of entries in system logs: Call to a member function author() on array...


    The URL of page the error occurred on was Not available

    Error: Call to a member function author() on array in /home/sosinvisioncom/public_html/applications/forums/sources/Forum/Forum.php:697
    Stack trace:
    #0 /home/sosinvisioncom/public_html/static/templates/forums_front_index.php(17): IPS\forums\Forum->lastPost()
    #1 /home/sosinvisioncom/public_html/system/Theme/SandboxedTemplate.php(68): IPS\Theme\class_forums_front_index->forumGridItem()
    #2 /home/sosinvisioncom/public_html/static/templates/forums_front_index.php(2705): IPS\Theme\SandboxedTemplate->__call()
    #3 /home/sosinvisioncom/public_html/system/Theme/SandboxedTemplate.php(68): IPS\Theme\class_forums_front_index->index()
    #4 /home/sosinvisioncom/public_html/applications/forums/modules/front/forums/index.php(252): IPS\Theme\SandboxedTemplate->__call()
    #5 /home/sosinvisioncom/public_html/system/Dispatcher/Controller.php(139): IPS\forums\modules\front\forums\index->manage()
    #6 /home/sosinvisioncom/public_html/applications/forums/modules/front/forums/index.php(76): IPS\Dispatcher\Controller->execute()
    #7 /home/sosinvisioncom/public_html/system/Dispatcher/Dispatcher.php(169): IPS\forums\modules\front\forums\index->execute()
    #8 /home/sosinvisioncom/public_html/index.php(16): IPS\Dispatcher->run()
    #9 {main}

    Backtrace:

    #0 /home/sosinvisioncom/public_html/system/Theme/SandboxedTemplate.php(78): IPS\Log::log()
    #1 /home/sosinvisioncom/public_html/static/templates/forums_front_index.php(2705): IPS\Theme\SandboxedTemplate->__call()
    #2 /home/sosinvisioncom/public_html/system/Theme/SandboxedTemplate.php(68): IPS\Theme\class_forums_front_index->index()
    #3 /home/sosinvisioncom/public_html/applications/forums/modules/front/forums/index.php(252): IPS\Theme\SandboxedTemplate->__call()
    #4 /home/sosinvisioncom/public_html/system/Dispatcher/Controller.php(139): IPS\forums\modules\front\forums\index->manage()
    #5 /home/sosinvisioncom/public_html/applications/forums/modules/front/forums/index.php(76): IPS\Dispatcher\Controller->execute()
    #6 /home/sosinvisioncom/public_html/system/Dispatcher/Dispatcher.php(169): IPS\forums\modules\front\forums\index->execute()
    #7 /home/sosinvisioncom/public_html/index.php(16): IPS\Dispatcher->run()
    #8 {main}

    The cause:

    				foreach( Db::i()->select( '*', 'forums_posts', array( 'topic_id=? AND queued=0', Db::i()->select( 'tid', 'forums_topics', array( 'forum_id=? AND approved=1 AND starter_id=? AND is_future_entry=0', $this->_id, Member::loggedIn()->member_id ), 'last_post DESC', 1 )->first() ), 'post_date DESC', $count ) as $post )
    				{
    					$results[ $post->post_date ] = [
    						'author'		    => $post->author(),

    You don't load the post object; it is an array.


    User Feedback

    Recommended Comments

    Adriano Faria

    Posted

    12 minutes ago, SeNioR- said:

    +

    xxx--xxx.thumb.png.600727dd0260c4d45c7b3a6b977d0794.png

    As a guest? There was an error on my fix but I fixed it... running fine now for members and guests. Probably cache?

    Guest:

    image.png.a85487d09e1721d26785b65450d0d31d.png

     

    Member:

    image.thumb.png.8f44902ab83ec9769813ac154d7d99aa.png


×
×
  • Create New...