2011-02-03 7 views
0

このエラーが表示されます。joomla致命的なエラー:24行目の components com_reviews controller.phpにある非オブジェクトのメンバ関数bind()を呼び出してください。

このエラーを解決するためにどこに変更を加える必要はありません。事前 で

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=& JFactory::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.'); 


} 

おかげデイブ

+0

投稿コードの24行はどちらですか? –

+0

if(!$ row-> bind(JRequest :: get( 'post'))) – dave

答えて

1

明らかにそれはJRequest::get('post')オブジェクトをインスタンス化することはできません。おそらくこの静的関数はNULLを返すでしょう。

次のことを試してみてください。

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

は、あなたが買ってあげるものを参照してください。

関連する問題