Error: Array to string conversion in com_eventbooking/view/event.php on line 90

  • Jeff Dun
  • Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 6 months ago #159499 by Jeff Dun
I'm getting this error in buildFormData when i submit an event, it has an error in the model, and is returned to the client to fix.
I have a custom validateFormInput override in the event model.

buildFormData is basically getting the custom attribute params in item->params instead of the event params.
I don't know if its something i've done, or if its a bug.
Any ideas?
Thanks
Jeff
 

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

More
2 years 6 months ago #159553 by Tuan Pham Ngoc
Sorry Jeff. I believe I fixed the issue but forgot to reply you here. Please access to My Downloads menu item, download latest package of Events Booking, upgrade it to your site, then check it again. The error should be gone

Regards,

Tuan

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

  • Jeff Dun
  • Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 6 months ago #159559 by Jeff Dun
Yes, its fixed.
Thanks!

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

  • Jeff Dun
  • Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 6 months ago #159560 by Jeff Dun
I can see the change - you are not converting to string anymore.
However, i don't understand why sometimes i get the event params in item->params, and sometimes the customFields.
For example, the first time, i can see user_registration.
The second time, i get the customFields.
I can see down further in the buildFormData method where data->params is set:
$registry = new Registry($item->custom_fields);
$data = new stdClass();
$data->params = $registry->toArray();

To me it seems that the same variable is being used for two different purposes.
Thanks
Jeff

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

More
2 years 6 months ago #159565 by Tuan Pham Ngoc
Hi Jeff

The code you mentioned is unrelated. $items->params is different from $data->params. $data->params there, is just a temp variable which is used to build the form object to allow rendering form to edit event custom fields.

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

Moderators: Tuan Pham Ngoc