Jaxel
Well-known member
So I am extending the add-reply as follows:
This code works great for QUICK reply. However, if a user instead clicks the "More Options" button, then click "Reply to Thread" option, it will return the following error:
Undefined property: XenForo_ControllerResponse_Redirect::$params
Code:
public function actionAddReply()
{
$response = parent::actionAddReply();
if ($this->_noRedirect())
{
$threadId = $this->_input->filterSingle('thread_id', XenForo_Input::UINT);
$article = $this->getModelFromCache('EWRporta2_Model_Articles')->getArticleByThreadIdOrAuto($threadId);
if(!empty($article['article_options']['comments']))
{
return $this->responseView(
'XenForo_ViewPublic_Thread_ViewNewPosts',
'EWRporta2_Thread_NewPosts',
$response->params
);
}
}
return $response;
}
This code works great for QUICK reply. However, if a user instead clicks the "More Options" button, then click "Reply to Thread" option, it will return the following error:
Undefined property: XenForo_ControllerResponse_Redirect::$params
- XenForo_Application::handlePhpError() in EWRporta2/ControllerPublic/Thread.php at line 47
- EWRporta2_ControllerPublic_Thread->actionAddReply() in XenForo/FrontController.php at line 347
- XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
- XenForo_FrontController->run() in /index.php at line 13