1

My code snippet:

public static function saveEntryView($content, $conf, $m_name, $m_firstname, $m_street, $m_zipcity, $m_phone, $m_email, $m_rooms, $m_etage, $m_wohnberechtigungsschein, $m_member, $m_mieter, $m_termin, $m_size, $m_msg ) 
{


    self::$conf['template'] = '/home/www/p422082/html/typo3/fileadmin/wgkw/templates/wgkwcontactform.html';

Before I had:

$this->$conf['template'] = '/home/www/p422082/html/typo3/fileadmin/wgkw/templates/wgkwcontactform.html';

Which basically says that I'm calling non-static object in a static function and gave me this error(totally fair):

Using $this when not in object context 

And led me to following topic PHP Fatal error: Using $this when not in object context and there I've found that it can be changed to:

self::$conf['template'] = '/home/www/p422082/html/typo3/fileadmin/wgkw/templates/wgkwcontactform.html';

But it gives me Access to undeclared static property: $conf error.

Which led me to this topic: Access to undeclared static property $this

which is basically going back to the beggining where the problem has started and this has left me quite confused. Appreciate any help/tips.

Ženia Bogdasic
  • 117
  • 1
  • 15

0 Answers0