fix for some Strict standards errors
3 posts
• Page 1 of 1
fix for some Strict standards errors
I set Error Reporting to development and finded some Strict standards errors and fixed those.
below is errors and fix for it:
in edit a sitemap in backend:
Error 1:
Strict standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method JHtmlXmap::priorities() should not be called statically in E:\wamp\www\joomla3\libraries\joomla\html\html.php on line 221
Error 2:
Strict standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method JHtmlXmap::changefrequency() should not be called statically in E:\wamp\www\joomla3\libraries\joomla\html\html.php on line 221
Fix:
in file: Eadministrator\components\com_xmap\helpers\html\xmap.php
search:
change it to:
search:
change it to:
below is errors and fix for it:
in edit a sitemap in backend:
Error 1:
Strict standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method JHtmlXmap::priorities() should not be called statically in E:\wamp\www\joomla3\libraries\joomla\html\html.php on line 221
Error 2:
Strict standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method JHtmlXmap::changefrequency() should not be called statically in E:\wamp\www\joomla3\libraries\joomla\html\html.php on line 221
Fix:
in file: Eadministrator\components\com_xmap\helpers\html\xmap.php
search:
- Code: Select all
function priorities($name, $value = '0.5', $j )
change it to:
- Code: Select all
public static function priorities($name, $value = '0.5', $j )
search:
- Code: Select all
function changefrequency($name, $value = 'weekly', $j )
change it to:
- Code: Select all
public static function changefrequency($name, $value = 'weekly', $j )
-

mhehm - Senior Boarder

- Posts: 53
- Joined: Sun Jan 20, 2013 1:22 pm
- Location: Iran
Re: fix for some Strict standards errors
in file Joomla root \components\com_xmap\router.php
search:
change it to:
search:
change it to
search:
change it to:
search:
- Code: Select all
$menu = &JSite::getMenu();
change it to:
- Code: Select all
$app = JFactory::getApplication();
$menu = $app->getMenu();
search:
- Code: Select all
$menuItem = &$menu->getItem($query['Itemid']);
change it to
- Code: Select all
$menuItem = $menu->getItem($query['Itemid']);
search:
- Code: Select all
$menuItem = &$menu->getActive();
change it to:
- Code: Select all
$menuItem = $menu->getActive();
-

mhehm - Senior Boarder

- Posts: 53
- Joined: Sun Jan 20, 2013 1:22 pm
- Location: Iran
Re: fix for some Strict standards errors
Hi mhehm, thanks for the help, I have added the changes on the base code:
https://github.com/guilleva/Xmap/commit/b1ca3d365dc160e405c7b5df98b79780a33c82ad
https://github.com/guilleva/Xmap/commit/b1ca3d365dc160e405c7b5df98b79780a33c82ad
-

guilleva - Administrator

- Posts: 1517
- Joined: Wed Sep 12, 2007 3:10 am
- Location: San José, Costa Rica
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests