Joomla - Deprecated: Non-static method JSite getMenu() should not be called statically, assuming $this from incompatible context in: различия между версиями
Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2023
Admin iph (обсуждение | вклад) (Новая страница: «=== Joomla - Deprecated: Non-static method JSite getMenu() should not be called statically, assuming $this from incompatible context in === Ошибка: Deprec...») |
Admin iph (обсуждение | вклад) |
||
Строка 10: | Строка 10: | ||
на | на | ||
$menu = JFactory::getApplication()->getMenu(); | $menu = JFactory::getApplication()->getMenu(); | ||
+ | |||
+ | |||
+ | Также можно скрыть ошибки через админку Joomla: | ||
+ | Система --> Общие настройки --> Сервер --> Сообщения об ошибка --> Нет |
Версия 07:48, 1 ноября 2021
Joomla - Deprecated: Non-static method JSite getMenu() should not be called statically, assuming $this from incompatible context in
Ошибка:
Deprecated: Non-static method JSite::getMenu() should not be called statically, assuming $this from incompatible context in /var/www/user1/data/www/site.com/templates/gk_magazine/lib/framework/helper.layout.php on line 150 Deprecated: Non-static method JApplication::getMenu() should not be called statically, assuming $this from incompatible context in /var/www/user1/data/www/site.com/includes/application.php on line 536
Решение - это открыть 150 строку файла /var/www/user1/data/www/site.com/templates/gk_magazine/lib/framework/helper.layout.php и сделать замену:
$menu = JSite::getMenu();
на
$menu = JFactory::getApplication()->getMenu();
Также можно скрыть ошибки через админку Joomla:
Система --> Общие настройки --> Сервер --> Сообщения об ошибка --> Нет