开发者

joomla Fatal error: Call to a member function bind() on a non-object in \components\com_reviews\controller.php on line 24

I m receiving this error.

I don't where should I make the changes to come over this error.

function comment()
{
    global $option;
    $row=& JTable::getInstance('comment','Table');
    if (!$row->bind(JRequest::get('post')))
    {
        echo "<script>alert('".$row->getError()."');
            window.history.go(-1);
        </script>\n";
        exit();
    }
    $row->comment_date=date('Y-m-d H:i:s');
    $user=& JFactor开发者_StackOverflow社区y::getUser();
    if ($user->_table_id)
    {
        $row->user_id=$user->_table_id;
    }
    if (!$row->store())
    {
        echo "<script>alert('".$row->getError()."');
            window.history.go(-1);</script>\n";
            exit();
    }
    $this->setRedirect('index.php?option='.$option.'&id'.$row->review_id.'&view=review','Comment Added.');


}  

thanks in advance Dave


Obviously it cannot instantiate the JRequest::get('post') object. Probably this static function is returning NULL.

Try the following:

$testObj = JRequest::get('post');
var_dump($testObj);

See what you'll get.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜