Martes, 22 Julio 2014 11:26
beggarly

fix for some Strict standards errors

Report Xmap bugs on this forum.

fix for some Strict standards errors

Postby mhehm » Mon Jan 21, 2013 5:51 am

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:
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 )
User avatar
mhehm
Senior Boarder
Senior Boarder
 
Posts: 71
Joined: Sun Jan 20, 2013 1:22 pm
Location: Iran

Re: fix for some Strict standards errors

Postby mhehm » Mon Jan 21, 2013 6:07 am

in file Joomla root \components\com_xmap\router.php

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();
User avatar
mhehm
Senior Boarder
Senior Boarder
 
Posts: 71
Joined: Sun Jan 20, 2013 1:22 pm
Location: Iran

Re: fix for some Strict standards errors

Postby guilleva » Mon Jan 21, 2013 1:01 pm

Hi mhehm, thanks for the help, I have added the changes on the base code:

https://github.com/guilleva/Xmap/commit/b1ca3d365dc160e405c7b5df98b79780a33c82ad
User avatar
guilleva
Administrator
Administrator
 
Posts: 1527
Joined: Wed Sep 12, 2007 3:10 am
Location: San José, Costa Rica


Return to Bugs



Who is online

Users browsing this forum: No registered users and 2 guests

cron