Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Fixed Error is server logs

Discussion in 'Showcase Resolved Bug Reports' started by C.Birch, Jan 6, 2013.

  1. C.Birch

    C.Birch Member AMS Premium SC Premium UBS Premium


    I have just checked my sites Server Error Logs from within Xenforo Admin CP and i have spotted its full of the following error.

    ErrorException: Argument 1 passed to NFLJ_Showcase_ControllerPublic_Comment::getCommentSpecificRedirect() must be an array, boolean given, called in /var/www/vhosts/****/public_html/library/NFLJ/Showcase/ControllerPublic/Comment.php on line 24 and defined - library/NFLJ/Showcase/ControllerPublic/Comment.php:28
    Generated By: Unknown Account, Today at 1:32 PM
    #0 /var/www/vhosts/****/public_html/library/NFLJ/Showcase/ControllerPublic/Comment.php(28): XenForo_Application::handlePhpError(4096, 'Argument 1 pass...', '/var/www/vhosts...', 28, Array)
    #1 /var/www/vhosts/****/public_html/library/NFLJ/Showcase/ControllerPublic/Comment.php(24): NFLJ_Showcase_ControllerPublic_Comment->getCommentSpecificRedirect(false, false, 5)
    #2 /var/www/vhosts/****/public_html/library/XenForo/FrontController.php(310): NFLJ_Showcase_ControllerPublic_Comment->actionIndex()
    #3 /var/www/vhosts/****/public_html/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #4 /var/www/vhosts/****/public_html/index.php(13): XenForo_FrontController->run()
    #5 {main}
    array(3) {
      ["url"] => string(47) "http://www.yourpshome.net/showcase-comment/183/"
      ["_GET"] => array(0) {
      ["_POST"] => array(0) {
  2. Bob

    Bob Developer Staff Member

    Trying to access a comment that doesn't exist. Most likely a deleted comment that has been indexed is my guess, or someone messing around changing the ID in the URL string for fun.

    I've added in a redirect to the showcase landing page when the provided ID returns a false.
  3. C.Birch

    C.Birch Member AMS Premium SC Premium UBS Premium

    I would say, it's google bots and that going by the rate its being listed in the logs :)
  4. Bob

    Bob Developer Staff Member

    until the next release, you can swap out the old method with this new one (to stop the error log from filling up)

    File to edit: /library/NFLJ/Showcase/ControllerPublic/Comment.php

    Method to replace: public function actionIndex (replace entire method with the one below)

        public function actionIndex()
    $commentId $this->_input->filterSingle('comment_id'XenForo_Input::UINT);
    $scItemModel $this->_getSCItemModel();
    $scCommentModel $this->_getSCCommentModel();
            if (!
    $comment $scCommentModel->getCommentById($commentId))
    $item $scItemModel->getItemById($comment['item_id']);
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.