- Posts: 156
- Thank you received: 0
Fatal error: Cannot access empty property
15 years 3 months ago #17905
by Rickhavoc
Fatal error: Cannot access empty property was created 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.
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.
15 years 3 months ago #17918
by nicolas
Replied by nicolas on topic Re: Fatal error: Cannot access empty property
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.
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.
15 years 3 months ago #17928
by Rickhavoc
Replied by Rickhavoc on topic Re: Fatal error: Cannot access empty property
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.
15 years 3 months ago #17929
by nicolas
Replied by nicolas on topic Re: Fatal error: Cannot access empty property
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.
15 years 3 months ago #17932
by Rickhavoc
Replied by Rickhavoc on topic Re: Fatal error: Cannot access empty property
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
"
"
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.
15 years 3 months ago #17935
by nicolas
Replied by nicolas on topic Re: Fatal error: Cannot access empty property
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.
15 years 3 months ago #17939
by Rickhavoc
Replied by Rickhavoc on topic Re: Fatal error: Cannot access empty property
Perfect!!
Please Log in or Create an account to join the conversation.
12 years 2 weeks ago #170225
by Ducnb
Replied by Ducnb on topic Re: Fatal error: Cannot access empty property
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
Please let me know.
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.
12 years 2 weeks ago #170235
by nicolas
Replied by nicolas on topic Re: Fatal error: Cannot access empty property
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.
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.
12 years 2 weeks ago #170678
by Ducnb
Replied by Ducnb on topic Re: Fatal error: Cannot access empty property
Thank you.
It's work with me
It's work with me
Please Log in or Create an account to join the conversation.
Time to create page: 0.213 seconds