[gone for now]Notice: Undefined offset:1 field.php

  • Posts: 101
  • Thank you received: 12
11 years 5 months ago #106863

EDIT: I can't explain it but the error is gone (for now?) I disabled a custom field of the order type and refreshed the page and the error was gone and now I re-enabled this custom field and it still works. Maybe it was cached??? I'll let you know when it comes back. Feel free if these two lines has a meaning to you?

Hi,

I'm getting the following message when I go to the checkout page:

Notice: Undefined offset: 1 in /home/xxxx/public_html/site/administrator/components/com_hikashop/classes/field.php on line 842

Notice: Undefined offset: 2 in /home/xxxx/public_html/site/administrator/components/com_hikashop/classes/field.php on line 846

These are the two lines in field.php:
Line 842: $val = $line[1];
Line 846: $disable = $line[2];

This is the part of the code of field.php:
function explodeValues($values){
		$allValues = explode("\n",$values);
		$returnedValues = array();

		foreach($allValues as $id => $oneVal){
			$line = explode('::',trim($oneVal));
			$var = $line[0];
			$val = $line[1];
			if(count($line)==2){
				$disable = '0';
			}else{
				$disable = $line[2];
			}
			if(strlen($val)>0){
				$obj = new stdClass();
				$obj->value = $val;
				$obj->disabled = $disable;
				$returnedValues[$var] = $obj;
			}
		}
		return $returnedValues;
	}



Thanks.

Last edit: 11 years 5 months ago by SG.
The following user(s) said Thank You: Eliot

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

  • Posts: 2334
  • Thank you received: 403
11 years 5 months ago #106883

Thanks for the report, we'll take a look at this :)
Don't hesitate to tell us if this is happening again.

EDIT: I indeed think this is because of the refresh. It's not really disturbing bu we'll add some check to avoid this in the future.

Last edit: 11 years 5 months ago by Eliot.

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

Time to create page: 0.067 seconds
Powered by Kunena Forum