2014-10-15 6 views
0

문제가 있습니다. 다음과 같은 오류가 발생했습니다. "치명적인 오류 : 58 행의 /var/www/Joomla/administrator/components/com_vodes/models/config.php에있는 객체가 아닌 loadByOption() 멤버 함수를 호출하십시오." 나는 Joomla 3.3.3을 사용하고있다. 이 값이 없기 때문에 나는 $ 테이블 변수가 아닌 객체를 만드는 3.3.3치명적인 오류 : 비 객체의 loadByOption() 멤버 함수 호출

function save() 
    { 
     // initialize variables. 
     $table   = JTable::getInstance('component'); 
     $params   = JRequest::getVar('params', array(), 'post', 'array'); 
     $row   = array(); 
     $row['option'] = 'com_vodes'; 
     $row['params'] = $params; 

     // load the component data for com_ajaxregister 
     if (!$table->loadByOption('com_vodes')) { 
      $this->setError($table->getError()); 
      return false; 
     } 

     // bind the new values 
     $table->bind($row); 

     // check the row. 
     if (!$table->check()) { 
      $this->setError($table->getError()); 
      return false; 
     } 

     // store the row. 
     if (!$table->store()) { 
      $this->setError($table->getError()); 
      return false; 
     } 

     return true; 
    } 

Please help to sought it out. 

답변

0
$table   = JTable::getInstance('component'); 

당신이 당신의 getInstance 기능에 잘못된 매개 변수를 전달하는의 getInstance 함수는 null을 반환 1.5에서 업그레이드 한 . 매개 변수 설정시 구성 요소 이름을 사용하십시오.

관련 문제