PHP error message

  • Posts: 56
  • Thank you received: 0
12 years 4 weeks ago #72427

I don't know enough about PHP to know if this error is important, if it is I'd like some advice on how to get rid of it.

In HS > Categories, if I open one (and only one) of my categories with sytem error reporting set to maximun, I get these error messages:

Notice: Undefined offset: 7 in [site path]/administrator/components/com_hikashop/helpers/translation.php on line 62

Notice: Trying to get property of non-object in [site path]/administrator/components/com_hikashop/helpers/translation.php on line 62


I went to the offending file and copied a few lines of code. Here are lines 56-63:

}
	function getFlag($id=0){
		$this->loadLanguages();
		if(isset($this->languages[$id])){
			return '<span style="background: url('.$this->flagPath.$this->languages[$id]->shortcode.'.gif) no-repeat;padding-left:20px">'.$this->languages[$id]->code.'</span>';
		}
		return $this->languages[$id]->code;
	}

Should I do anything about this? Sounds like it has to do with JoomFish. I have checked and resaved the translations for the category name and description; they are all fine.

Thanks for any advice.


HikaShop Business 2.3.2 on Joomla 1.5.26 + JoomFish 2.1.6 - Multilingual site

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
12 years 4 weeks ago #72428

That error message just says that it can't find one of the language of your website in Joomfish and because of that it can't display the code properly.
That's not really a problem. It's just a display issue that you can ignore.

If you want to remove it you can change the line:
return $this->languages[$id]->code;

to:
return @$this->languages[$id]->code;

The following user(s) said Thank You: dforrest

Please Log in or Create an account to join the conversation.

  • Posts: 56
  • Thank you received: 0
12 years 4 weeks ago #72450

Got it.

This was because I translated one category name into French but no more. I've now deactivated French as a language for our initial launch, and voilà. The message disappeared when I reactivated French but now I know I can safely ignore it, thanks!


HikaShop Business 2.3.2 on Joomla 1.5.26 + JoomFish 2.1.6 - Multilingual site

Please Log in or Create an account to join the conversation.

Time to create page: 0.045 seconds
Powered by Kunena Forum