2012-08-13 3 views
0

이미 5 일이 지났지 만 여전히 문제가 어디인지 파악할 수 없습니다! 그래서 여기에 나는 오류와 전체 코드를 게시한다. 희망을 갖고 누군가가 도울 수 있기를 바랍니다! 나는 그것을 대단히 감사 할 것이다.치명적인 오류 : 비 객체의 멤버 함수 Show_LastRec_Pack()에 대한 호출

Fatal error: Call to a member function Show_LastRec_Pack() on a non-object in packgames.php on line 69 

여기에 "packgames.php"입니다 : 객체 호출 템플릿을 반환 무엇이든

<? 
/** 
* Block Last Rec Pack 
**/ 
define ('PACK_GAMES_TO_SHOW', 3); 

require_once ('recmod/constants.php'); 

$query = "SELECT r.*, pp.topic_id, p.Nick, b.*, p.Rating 
      FROM " . TABLE_RECGAMES . " r, " . $this->db->obj['sql_tbl_prefix'] . "attachments a, " . $this->db->obj['sql_tbl_prefix'] . "posts pp, 
       " . TABLE_PLAYERS." p, recs_aoc_flags b 
      WHERE a.attach_id = r.attach_id 
       AND a.attach_rel_id = pp.pid 
       AND r.Id_Player > 0 
       AND p.Id_Player = r.Id_Player 
       AND b.flag_id = p.flag_id 
      ORDER BY r.Id_RecordedGame DESC 
      LIMIT " . PACK_GAMES_TO_SHOW; 

$this->DB->query($query);  
$packs = array(); 
while ($player = $this->DB->fetch()) 
{ 
    $flag = '<img src="' . PATH_FLAGS . $player['flag_image'] . '" alt="'.$player['flag_country'].'" title="' . $player['flag_country'] . '" align="absmiddle" border="0">'; 

    $packs[] = array (
     'GAMES' => $player['Players'], 
     'PLAYER' => $player['Nick'], 
     'FLAG' => $flag, 
     'RATING' => $player['Rating'], 
     'ID_POST' => $player['topic_id'] 
    ); 
} 
$tmp = $this->registry->getClass('output')->getTemplate('recgames')->Show_LastRec_Pack ($packs);  
echo $tmp; 
?> 

답변

0

, 그것은 대상이 아니다. 호출 체인에서 var_dumps()를 수행하고 null이 아닌 다른 객체가 반환되는 위치를 파악합니다. 대체로 getTemplate()에 있습니다.

+0

답장을 보내 주셔서 감사합니다. 나는 시도했다 : echo var_dump ($ tmp); 그러나 아무 소용이 없습니다! 이 줄에 같은 오류를 계속 경고합니다 : $ tmp = $ this-> registry-> getClass ('output') -> getTemplate ('recgames') -> Show_LastRec_Pack ($ packs); –

관련 문제