?
avatar boomsya
boomsya
25 Mar 2016

Notice: Undefined variable: this in /var/www/html/libraries/cms/application/cms.php on line 430

something wrong on lines:

// Inject this application object into the JMenu tree if one isn't already specified
if (!isset($options['app']))
{
    $options['app'] = $this;
}

php 5.4.35
mysql 5.5

avatar boomsya boomsya - open - 25 Mar 2016
avatar brianteeman brianteeman - change - 25 Mar 2016
Labels Added: ?
avatar mbabker
mbabker - comment - 25 Mar 2016

This isn't a core issue. The method raising the error, JApplicationCms::getMenu(), is not declared as static and should not be called in a static manner. If you're getting this error, it means that an extension is calling this method statically.

The correct way to call it is JFactory::getApplication()->getMenu().

avatar mbabker mbabker - close - 25 Mar 2016
avatar mbabker mbabker - close - 25 Mar 2016
avatar mbabker mbabker - change - 25 Mar 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-03-25 13:34:28
Closed_By mbabker
avatar boomsya
boomsya - comment - 25 Mar 2016

but have no code JApplicationCms::getMenu() in sources
maybe another code can make this issue?

avatar mbabker
mbabker - comment - 25 Mar 2016

There are a lot of ways it could be called...

  • JSite::getMenu() and JAdministrator::getMenu() (since the legacy application classes are aliased)
  • JApplicationSite::getMenu() and JApplicationAdministrator::getMenu()
// $app could be any variable someone wanted to use, common ones are $app, $application, and $mainframe
$app = JFactory::getApplication();
$app::getMenu();
avatar boomsya
boomsya - comment - 26 Mar 2016

i founded JSite::getMenu() in problem source and replaced to JFactory::getApplication()->getMenu() and error gone. thanks. it was mod_mijopolls

Add a Comment

Login with GitHub to post a comment