[Skip to main content](#vessel-content)

#   During checkout: Object of class stdClass could not be converted to string

##

- **[Udo](/forum/user/29928-udo "View Udo's Profile")**
- [![Udo's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/29928-udo "View Udo's Profile") Topic Author
- [ Offline](/forum/user/29928-udo)

Less More

- Posts: 220
- Thank you received: 8
-
-
-

4 years 8 months ago -  4 years 8 months ago [\#340028](#340028) by [Udo](/forum/user/29928-udo "View Udo's Profile")  *[During checkout: Object of class stdClass could not be converted to string](/forum/27-checkout/904096-during-checkout-object-of-class-stdclass-could-not-be-converted-to-string#340028 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.10.6 -- PHP version -- : 7.4.28 -- Error-message(debug-mod must be tuned on) -- : Object of class stdClass could not be converted to string  Hi,  Suddenly checkout in the shop is blocked.  No problem in the first checkout step, the login. In the second step the customer selects addresses. Clicking the button Next step results in a white page, 500 Internal Server Error, showing the text  This is in PHP 7.4. When downgrading to PHP 7.3 the white page already comes right after the first step. Then the error text is  Just before I upgraded Joomla 3.9.28 to Joomla 3.10.6 So that's probably related to the problem.  Please advice how to solve this problem.  Udo  EXTRA INFORMATION ! In error&#95;log I discovered older notifications that might give a clue: At that time I was still using Joomla 3.9.28 en PHP 7.3")* was created by *[Udo](/forum/user/29928-udo "View Udo's Profile")*

-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.10.6
-- PHP version -- : 7.4.28
-- Error-message(debug-mod must be tuned on) -- : Object of class stdClass could not be converted to string

Hi,

Suddenly checkout in the shop is blocked.

No problem in the first checkout step, the login.
In the second step the customer selects addresses. Clicking the button Next step results in a white page, 500 Internal Server Error, showing the text Code:

Object of class stdClass could not be converted to string

This is in PHP 7.4.
When downgrading to PHP 7.3 the white page already comes right after the first step.
Then the error text is Code:

Recoverable fatal error: Object of class stdClass could not be converted to string in /PRIVATE/public_html/libraries/joomla/database/driver/mysqli.php on line 254

Just before I upgraded Joomla 3.9.28 to Joomla 3.10.6
So that's probably related to the problem.

Please advice how to solve this problem.

Udo

EXTRA INFORMATION !
In error_log I discovered older notifications that might give a clue:
At that time I was still using Joomla 3.9.28 en PHP 7.3 Code:

PHP Warning: mysqli_real_escape_string() expects parameter 2 to be string, object given in /PRIVATE/public_html/libraries/joomla/database/driver/mysqli.php on line 254

Last edit: 4 years 8 months ago by [Udo](/forum/user/29928-udo "View Udo's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwNDA5Ni1kdXJpbmctY2hlY2tvdXQtb2JqZWN0LW9mLWNsYXNzLXN0ZGNsYXNzLWNvdWxkLW5vdC1iZS1jb252ZXJ0ZWQtdG8tc3RyaW5nP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14327
-
-

4 years 8 months ago [\#340029](#340029) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[During checkout: Object of class stdClass could not be converted to string](/forum/27-checkout/904096-during-checkout-object-of-class-stdclass-could-not-be-converted-to-string#340029 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.10.6 -- PHP version -- : 7.4.28 -- Error-message(debug-mod must be tuned on) -- : Object of class stdClass could not be converted to string  Hi,  Suddenly checkout in the shop is blocked.  No problem in the first checkout step, the login. In the second step the customer selects addresses. Clicking the button Next step results in a white page, 500 Internal Server Error, showing the text  This is in PHP 7.4. When downgrading to PHP 7.3 the white page already comes right after the first step. Then the error text is  Just before I upgraded Joomla 3.9.28 to Joomla 3.10.6 So that's probably related to the problem.  Please advice how to solve this problem.  Udo  EXTRA INFORMATION ! In error&#95;log I discovered older notifications that might give a clue: At that time I was still using Joomla 3.9.28 en PHP 7.3")*

Hi,

It's hard to say because that error is in a Joomla file and the error message you provided doesn't contain the callstack which would display which file used the mysqli.php file.
Could you activate the "debug system" option of the Joomla configuration ? That should hopefully give more information when you reproduce the problem.
If not then I don't know. It's possible that the error is not even in HikaShop but in something else used on the page (a 3rd party extension, a custom plugin, etc). So even updating HikaShop might not help.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwNDA5Ni1kdXJpbmctY2hlY2tvdXQtb2JqZWN0LW9mLWNsYXNzLXN0ZGNsYXNzLWNvdWxkLW5vdC1iZS1jb252ZXJ0ZWQtdG8tc3RyaW5nP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Udo](/forum/user/29928-udo "View Udo's Profile")**
- [![Udo's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/29928-udo "View Udo's Profile") Topic Author
- [ Offline](/forum/user/29928-udo)

Less More

- Posts: 220
- Thank you received: 8
-
-
-

4 years 8 months ago [\#340044](#340044) by [Udo](/forum/user/29928-udo "View Udo's Profile")  Replied by *[Udo](/forum/user/29928-udo "View Udo's Profile")* on topic *[During checkout: Object of class stdClass could not be converted to string](/forum/27-checkout/904096-during-checkout-object-of-class-stdclass-could-not-be-converted-to-string#340044 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.10.6 -- PHP version -- : 7.4.28 -- Error-message(debug-mod must be tuned on) -- : Object of class stdClass could not be converted to string  Hi,  Suddenly checkout in the shop is blocked.  No problem in the first checkout step, the login. In the second step the customer selects addresses. Clicking the button Next step results in a white page, 500 Internal Server Error, showing the text  This is in PHP 7.4. When downgrading to PHP 7.3 the white page already comes right after the first step. Then the error text is  Just before I upgraded Joomla 3.9.28 to Joomla 3.10.6 So that's probably related to the problem.  Please advice how to solve this problem.  Udo  EXTRA INFORMATION ! In error&#95;log I discovered older notifications that might give a clue: At that time I was still using Joomla 3.9.28 en PHP 7.3")*

Hi,

I just discovered on my local test website that there is no problem in Joomla 3.10.5
When upgrading 3.10.5 to 3.10.6 the problem arises.
So the issue is Joomla 3.10.6 related.

Udo

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwNDA5Ni1kdXJpbmctY2hlY2tvdXQtb2JqZWN0LW9mLWNsYXNzLXN0ZGNsYXNzLWNvdWxkLW5vdC1iZS1jb252ZXJ0ZWQtdG8tc3RyaW5nP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14327
-
-

4 years 8 months ago [\#340053](#340053) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[During checkout: Object of class stdClass could not be converted to string](/forum/27-checkout/904096-during-checkout-object-of-class-stdclass-could-not-be-converted-to-string#340053 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.10.6 -- PHP version -- : 7.4.28 -- Error-message(debug-mod must be tuned on) -- : Object of class stdClass could not be converted to string  Hi,  Suddenly checkout in the shop is blocked.  No problem in the first checkout step, the login. In the second step the customer selects addresses. Clicking the button Next step results in a white page, 500 Internal Server Error, showing the text  This is in PHP 7.4. When downgrading to PHP 7.3 the white page already comes right after the first step. Then the error text is  Just before I upgraded Joomla 3.9.28 to Joomla 3.10.6 So that's probably related to the problem.  Please advice how to solve this problem.  Udo  EXTRA INFORMATION ! In error&#95;log I discovered older notifications that might give a clue: At that time I was still using Joomla 3.9.28 en PHP 7.3")*

Hi,

I tried a checkout on my end on a local test environment with Joomla 3.10.6 but I didn't get the error either.

From what I understand, the error happens on line: Code:

$result = mysqli_real_escape_string($this-&gt;getConnection(), (string) $text);

in the file /libraries/joomla/database/driver/mysqli.php because $text isn't a string but an object.

So what you can do to change that code to: Code:

if(is_object($text)) { echo '&lt;pre&gt;'; var_dump(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS)); echo '&lt;/pre&gt;'; exit; } $result = mysqli_real_escape_string($this-&gt;getConnection(), (string) $text);

That should display the callstack leading to that error so that we better understand where the problem comes from.
And to circumvent the problem, you can try to use: Code:

if(is_object($text)) { $text = ''; } $result = mysqli_real_escape_string($this-&gt;getConnection(), (string) $text);

that way, you should not get an error but this might lead to unexpected issues on your website... The best would be to figure out the source of the problem.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwNDA5Ni1kdXJpbmctY2hlY2tvdXQtb2JqZWN0LW9mLWNsYXNzLXN0ZGNsYXNzLWNvdWxkLW5vdC1iZS1jb252ZXJ0ZWQtdG8tc3RyaW5nP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Udo](/forum/user/29928-udo "View Udo's Profile")**
- [![Udo's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/29928-udo "View Udo's Profile") Topic Author
- [ Offline](/forum/user/29928-udo)

Less More

- Posts: 220
- Thank you received: 8
-
-
-

4 years 8 months ago [\#340063](#340063) by [Udo](/forum/user/29928-udo "View Udo's Profile")  Replied by *[Udo](/forum/user/29928-udo "View Udo's Profile")* on topic *[During checkout: Object of class stdClass could not be converted to string](/forum/27-checkout/904096-during-checkout-object-of-class-stdclass-could-not-be-converted-to-string#340063 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.10.6 -- PHP version -- : 7.4.28 -- Error-message(debug-mod must be tuned on) -- : Object of class stdClass could not be converted to string  Hi,  Suddenly checkout in the shop is blocked.  No problem in the first checkout step, the login. In the second step the customer selects addresses. Clicking the button Next step results in a white page, 500 Internal Server Error, showing the text  This is in PHP 7.4. When downgrading to PHP 7.3 the white page already comes right after the first step. Then the error text is  Just before I upgraded Joomla 3.9.28 to Joomla 3.10.6 So that's probably related to the problem.  Please advice how to solve this problem.  Udo  EXTRA INFORMATION ! In error&#95;log I discovered older notifications that might give a clue: At that time I was still using Joomla 3.9.28 en PHP 7.3")*

Hi,
Thanks for your information, that comes in handy with new notifications.

Just before I read your reply I tested if upgrading Hikashop might help, although it seems to be a Joomla issue.
And it did help!

After upgrading to Hikashop 4.5.0 the issue is gone, the checkout is okay again and customers can order.

So an Hikashop issue after all?

By the way, I didnot receive any notifications of reply to this topic.

Regards,
Udo

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwNDA5Ni1kdXJpbmctY2hlY2tvdXQtb2JqZWN0LW9mLWNsYXNzLXN0ZGNsYXNzLWNvdWxkLW5vdC1iZS1jb252ZXJ0ZWQtdG8tc3RyaW5nP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14327
-
-

4 years 8 months ago [\#340066](#340066) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[During checkout: Object of class stdClass could not be converted to string](/forum/27-checkout/904096-during-checkout-object-of-class-stdclass-could-not-be-converted-to-string#340066 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.10.6 -- PHP version -- : 7.4.28 -- Error-message(debug-mod must be tuned on) -- : Object of class stdClass could not be converted to string  Hi,  Suddenly checkout in the shop is blocked.  No problem in the first checkout step, the login. In the second step the customer selects addresses. Clicking the button Next step results in a white page, 500 Internal Server Error, showing the text  This is in PHP 7.4. When downgrading to PHP 7.3 the white page already comes right after the first step. Then the error text is  Just before I upgraded Joomla 3.9.28 to Joomla 3.10.6 So that's probably related to the problem.  Please advice how to solve this problem.  Udo  EXTRA INFORMATION ! In error&#95;log I discovered older notifications that might give a clue: At that time I was still using Joomla 3.9.28 en PHP 7.3")*

Hi,

Well, with an old version of HikaShop, you risk having issues with recent versions of Joomla and PHP.
It doesn't mean there was a bug in HikaShop 4.3.0. It's just that something HikaShop relied on in Joomla or PHP changed. The modifications we make in HikaShop in every release are also meant to properly support these changes since we can't support them before we know about them.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwNDA5Ni1kdXJpbmctY2hlY2tvdXQtb2JqZWN0LW9mLWNsYXNzLXN0ZGNsYXNzLWNvdWxkLW5vdC1iZS1jb252ZXJ0ZWQtdG8tc3RyaW5nP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.063 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
