Skip to main content

Fatal error: Cannot access empty property

More
15 years 3 months ago #17905 by Rickhavoc
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.

More
15 years 3 months ago #17918 by nicolas
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.

More
15 years 3 months ago #17928 by Rickhavoc
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.

More
15 years 3 months ago #17929 by nicolas
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.

More
15 years 3 months ago #17932 by Rickhavoc
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.

More
15 years 3 months ago #17935 by nicolas
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.

More
15 years 3 months ago #17939 by Rickhavoc

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

More
12 years 2 weeks ago #170225 by Ducnb
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
Code:
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.

More
12 years 2 weeks ago #170235 by nicolas
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.

More
12 years 2 weeks ago #170678 by Ducnb
Thank you.
It's work with me

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

Time to create page: 0.291 seconds
Powered by Kunena Forum