Fatal error: Cannot access empty property

  • Posts: 156
  • Thank you received: 0
13 years 5 months ago #17905

Fatal error: Cannot access empty property in /home/.../administrator/components/com_hikashop/classes/field.php on line 127

125 }
126 if(empty($data->$id) && empty($data->$namekey)){
127 $data->$namekey = $field->field_default;
128 }


What do you think it might be?

all i am trying to is create a link to the registration page.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 5 months ago #17918

That happens because the $namekey variable is empty. That should not happen as hikashop checks that the namekey is not empty when you create a custom field. However, this might be a bug.
I'm seeing that it could come from a custom field of the type "custom text". If you created one please unpublish it and try again.

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

  • Posts: 156
  • Thank you received: 0
13 years 5 months ago #17928

That was exactly what it was. your good nicolas! but know how i put the text i need in there? oh man..

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 5 months ago #17929

Please download again HikaShop and install it over your current version. That should fix the problem.

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

  • Posts: 156
  • Thank you received: 0
13 years 5 months ago #17932

downloaded, installed , clear cache , and global check in, still getting

"
Fatal error: Cannot access empty property in /home/..../administrator/components/com_hikashop/classes/field.php on line 127
"

:(

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 5 months ago #17935

Did you create a new custom field of the type "custom text" ? You previous custom field needs to be deleted.

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

  • Posts: 156
  • Thank you received: 0
13 years 5 months ago #17939

Perfect!!

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

  • Posts: 6
  • Thank you received: 0
10 years 2 months ago #170225

Hi Sir.
current I'm using Hkashop v2.3.0 same error on other line
Fatal error: Cannot access empty property in : administrator/components/com_hikashop/classes/field.php on line 292

if(empty($data->$id) && empty($data->$namekey)){
	if($data == null || empty($data))
		$data = new stdClass();
	if(empty($fields[$namekey]->field_options['pleaseselect'])){
		$data->$namekey = $field->field_default;
	}else{
		$data->$namekey = '';
	}
}

Please let me know.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 2 months ago #170235

Hi,

Change the line:
if(empty($data->$id) && empty($data->$namekey)){

to:
if(empty($data->$id) && !empty($namekey) && empty($data->$namekey)){

and that should avoid the error.

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

  • Posts: 6
  • Thank you received: 0
10 years 2 months ago #170678

Thank you.
It's work with me

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

Time to create page: 0.079 seconds
Powered by Kunena Forum