What does this Fatal Error mean?

Discussion in 'PHP' started by egdcltd, Nov 8, 2007.

  1. #1
    Okay, in a phpBB mod I'm trying out, one page gives this error:

    Lines 429-431 are

    	$template->set_filenames(array(
    		"body" => 'admin/config_cd_cards_list_body.tpl')
    	);
    PHP:
    I've never come across this error before, what does it mean please?
     
    egdcltd, Nov 8, 2007 IP
  2. tonybogs

    tonybogs Peon

    Messages:
    462
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This error is raised when you are trying to call an objects method but the object doesnt exist.

    In your example $template is not defined as an object. Make sure you have defined it, and if it is defined you havent overwritten the variable anywhere.

    Good Luck :)
     
    tonybogs, Nov 8, 2007 IP
  3. kber

    kber Well-Known Member

    Messages:
    888
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    110
    #3
    "body" => 'admin/config_cd_cards_list_body.tpl')
    Code (markup):
    Should be
    "body" => 'admin/admin_card_duel_cards.tpl')
    Code (markup):
     
    kber, Nov 8, 2007 IP
  4. egdcltd

    egdcltd Peon

    Messages:
    691
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Unfortunately, that won't work, as the tpl name is correct. It is config_cd_cards_list_body.tpl
     
    egdcltd, Nov 8, 2007 IP
  5. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #5
    tonybogs provided the right answer to your problem. But it's impossible for us to help you further without seeing your code.
     
    nico_swd, Nov 8, 2007 IP
  6. egdcltd

    egdcltd Peon

    Messages:
    691
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #6
    egdcltd, Nov 8, 2007 IP