PHP Warning. UTF-8 and json_encode


My web server log tells me I’m experiencing an issue with the plugin. This is the message:

PHP Warning: json_encode(): Invalid UTF-8 sequence in argument in /[...]/easyreservations/easyReservations_form_shortcode.php

And the line affected is: $all_rooms = json_encode($all_rooms);

I don’t know if could be a big problem, but I am not receiving many emails from the server when the reservations are made. What could be the reason for this? The emails doesn’t reach the SMTP server, I have checked that in the server logs.

I am very concerned with this problem, I really appreciate any help from you.

Thank you in advance.

This array stores all resources informations in it. I don’t exactly know what a invalid UTF-8 sentence could be, but it will be most likely something in the content of a resource. However, that won’t be related to the email problem.
Did you tried the wordpress smtp plugin to force it to send through your smtp server?

Yes I did. I tried a lot of SMTP plugins, but the issue occurs before sending. The data does not reach the smtp server, I checked so in my server logs, so I think is something related with the form. What could be happening? Do you have any idea? Can I write some code in any place of you plugin in order to store any time it tries to send the form? Can you tell me where I must write this debug code?
I am really desperate with this problem.
Thank you!

Did you activated the emails after reservations in the email settings? It’s the function sendMail in /lib/classes/reservation.class.php. And if you use the send mail function in the dashboard does it shows them as send successfully?

You must be logged in to reply in this thread.