getk2 / k2

K2 - the powerful content extension for Joomla
https://getk2.org
GNU General Public License v3.0
135 stars 96 forks source link

JSite::getMenu in mod_k2_user/helper.php - Using $this when not in object context #460

Closed marcin-gryszkalis closed 5 years ago

marcin-gryszkalis commented 6 years ago

there's

$menu = JSite::getMenu();

and it causes "Using $this when not in object context" error on Joomla 3.8 on PHP 7.2 Should be replaced by

$menu = JFactory::getApplication()->getMenu();

Reported by someone else too: https://www.joomlaworks.net/forum/k2-en/48108-k2-v2-8-not-error-with-php7#163427

fevangelou commented 6 years ago

It's fixed already in 2.9.1.

On Mon, Oct 29, 2018, 11:30 PM Marcin Gryszkalis notifications@github.com wrote:

there's

$menu = JSite::getMenu();

and it causes "Using $this when not in object context" error on Joomla 3.8 on PHP 7.2 Should be replaced by

$menu = JFactory::getApplication()->getMenu();

Reported by someone else too: https://www.joomlaworks.net/forum/k2-en/48108-k2-v2-8-not-error-with-php7#163427

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/getk2/k2/issues/460, or mute the thread https://github.com/notifications/unsubscribe-auth/ABPdG1lc0KM7tiTJeAWBQGlzKiFB-5jDks5up3NsgaJpZM4YAgB8 .