Hi,
My website is throwing this error message to the error_log file:
PHP Deprecated: Non-static method JApplicationCms::getMenu() should not be called statically in /home/sherwini/public_html/libraries/cms/application/site.php on line 272
The error is coming from a core joomla file.
Joomla version: 3.7.5, PHP 7.0
Thanks!
Labels |
Added:
?
|
Category | ⇒ | Libraries |
Here is the code:
260 /**
261 * Return a reference to the JMenu object.
262 *
263 * @Param string $name The name of the application/client.
264 * @Param array $options An optional associative array of configuration settings.
265 *
266 * @return JMenu JMenu object.
267 *
268 * @SInCE 3.2
269 */
270 public function getMenu($name = 'site', $options = array())
271 {
272 return parent::getMenu($name, $options);
273 }
Status | New | ⇒ | Discussion |
Without a full stack trace this cannot be pursued further. The error message only states the line/file that the error was thrown from, it does not provide information about who/what made the call and how they made it (static or object context).
At the top of the method , you can temporarily add:
if (JFactory::getUser()->authorise('core.admin', 'root.1'))
{
echo "<pre>"; debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); echo "</pre>";
}
and then login as super admin to your website frontend
This way you will find out which extension (e.g. some file of your Joomla template or some extension related to your Joomla template) is making the call in the wrong way,
and report it to the authors of the extension
Also this an old error, you can search for it in google
there are several threads about this error
e.g.
https://stackoverflow.com/questions/15922391/strict-standards-non-static-method-jsitegetmenu-should-not-be-called-static
e.g.
https://forum.joomla.org/viewtopic.php?t=828964
I am closing this as not a core issue. This is almost always an issue with the template as explained in the links above. For further support please contact your template developer or use the forums https://forum.joomla.org
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-08-24 20:21:33 |
Closed_By | ⇒ | brianteeman |
That's just the line emitting the error, that's not the line actually making the incorrect call.