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...

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:

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

Popular posts from this blog

Warning, the Safe Path is not accessible vm3 - Joomla! Forum - community, help and support

2.5.28 to 3.4.1---Download of update package failed - Joomla! Forum - community, help and support

Your host needs to use PHP 5.3.10 or higher to run this vers - Joomla! Forum - community, help and support