Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

hjortur17's avatar

Mobile issue.

I always get this to my log when the site is used on mobile.

production.ERROR: The Response content must be a string or object implementing __toString(), "boolean" given. {"exception":"[object] (UnexpectedValueException(code: 0): The Response content must be a string or object implementing __toString(), "boolean" given. at /home/forge/parkandfly.is/vendor/symfony/http-foundation/Response.php:401)

Any ideas why?

0 likes
2 replies
Cronix's avatar

Not without more to go on, besides check everywhere where you return something back to the browser. There's at least one place in your code that isn't right but we'd have no idea where it could be based on that message and not seeing all of your code.

hjortur17's avatar
hjortur17
OP
Best Answer
Level 14

Yeah I understand. I changed how we are saving bookings. I stoped using session and began to use database, now I save the booking in the database before the customer pays and then updated it when the customer has paid.

Please or to participate in this conversation.