Static PHP method - Joomla! Forum - community, help and support
hi,
am getting error on site pages and, although goes when turn error reporting off, assume needs more permanent fix!!
the error is...
which relates line
i know non static method, has ideas should make 'static'?
cheers
paul
am getting error on site pages and, although goes when turn error reporting off, assume needs more permanent fix!!
the error is...
code: select all
strict standards: non-static method japplicationcms::getmenu() should not called statically in /home/ciwlpg13/public_html/libraries/cms/application/site.php on line 272
which relates line
code: select all
$menu = parent::getmenu($name, $options);
i know non static method, has ideas should make 'static'?
cheers
paul
getmenu() isn't declared static function:
you don't want change getmenu() static function.
you want use more along lines of:
code: select all
public function getmenu($name = 'site', $options = array())
you don't want change getmenu() static function.
you want use more along lines of:
code: select all
$app = jfactory::getapplication();
$menu = $app->getmenu($name,$options);
Comments
Post a Comment