We have installed I18N Plugin and we are using it for Hierarchical Menus.
We were seeing the following Error Messages after we changed the PHP Version to 7:
We are not getting any Error Messages after we did the following 2 changes to the frontend.class.php File as suggested earlier in this Thread:
1. Changed Line 219 From
To
2. Added following empty __construct function Code to Line 350 after class I18nNavigationItem { at Line 349
Lakshmanan
We were seeing the following Error Messages after we changed the PHP Version to 7:
Code:
[19-Feb-2021 10:33:13 Asia/Kolkata] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; I18nNavigationItem has a deprecated constructor in /home/xxxx/public_html/plugins/i18n_navigation/frontend.class.php on line 349
[19-Feb-2021 10:33:13 Asia/Kolkata] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/xxxx/public_html/plugins/i18n_navigation/frontend.class.php on line 219
We are not getting any Error Messages after we did the following 2 changes to the frontend.class.php File as suggested earlier in this Thread:
1. Changed Line 219 From
Code:
'haschildren' => $showChildren ? count($children) > 0 : self::hasChildren($childurl, $show)
Code:
'haschildren' => $showChildren ? $children && count($children) > 0 : self::hasChildren($childurl, $show)
2. Added following empty __construct function Code to Line 350 after class I18nNavigationItem { at Line 349
Code:
public function __construct() {}
Lakshmanan