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

#   Error on Add to cart

##

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

Less More

- Posts: 181
- Thank you received: 28
-
-

2 years 1 month ago -  2 years 1 month ago [\#363546](#363546) by [yerg55](/forum/user/60833-yerg55 "View yerg55's Profile")  *[Error on Add to cart](/forum/25-install-update/908675-error-on-add-to-cart#363546 "-- HikaShop version -- : 5.1.1 &#91;2409180854&#93; -- Joomla version -- : 4.4.8 -- PHP version -- : 8.2.23 -- Error-message(debug-mod must be tuned on) -- : Deprecated: Use of &quot;self&quot; in callables is deprecated in /libraries/vendor/phpseclib/bcmath&#95;compat/src/BCMath.php on line 492  Adding any item to the cart throws 25 identical errors in the cart module as follows  Updating everything before chasing other issues discussed here and this popped up")* was created by *[yerg55](/forum/user/60833-yerg55 "View yerg55's Profile")*

-- HikaShop version -- : 5.1.1 [2409180854]
-- Joomla version -- : 4.4.8
-- PHP version -- : 8.2.23
-- Error-message(debug-mod must be tuned on) -- : Deprecated: Use of "self" in callables is deprecated in /libraries/vendor/phpseclib/bcmath_compat/src/BCMath.php on line 492

Adding any item to the cart throws 25 identical errors in the cart module as follows

> Deprecated: Use of "self" in callables is deprecated in /libraries/vendor/phpseclib/bcmath\_compat/src/BCMath.php on line 492

Updating everything before chasing other issues discussed here and this popped up

Last edit: 2 years 1 month ago by [yerg55](/forum/user/60833-yerg55 "View yerg55's Profile"). Reason: Resolved

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwODY3NS1lcnJvci1vbi1hZGQtdG8tY2FydD90bXBsPW1hcmtkb3du) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86576
- Thank you received: 14318
-
-

2 years 1 month ago [\#363553](#363553) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Error on Add to cart](/forum/25-install-update/908675-error-on-add-to-cart#363553 "-- HikaShop version -- : 5.1.1 &#91;2409180854&#93; -- Joomla version -- : 4.4.8 -- PHP version -- : 8.2.23 -- Error-message(debug-mod must be tuned on) -- : Deprecated: Use of &quot;self&quot; in callables is deprecated in /libraries/vendor/phpseclib/bcmath&#95;compat/src/BCMath.php on line 492  Adding any item to the cart throws 25 identical errors in the cart module as follows  Updating everything before chasing other issues discussed here and this popped up")*

Hi,

HikaShop uses the PHP function called bccomp in some areas when comparing floating numbers for greater precision / control.
It seems that the bcmath compat was added to Joomla for servers where bcmath is not available in PHP.
And the deprecated message there comes from that bcmath compat library.
This comes from changes made in PHP 8.2 :
[ exakat.readthedocs.io/en/latest/Referenc...#deprecated-callable](https://exakat.readthedocs.io/en/latest/Reference/Rules/Functions/DeprecatedCallable.html#deprecated-callable)
I found one instance on the web with someone else simply turning off the error reporting to avoid the message from popping up:
[ github.com/SondagesPro/pdfReport/commit/...5d6a5cd0fbee3387R821](https://github.com/SondagesPro/pdfReport/commit/c239b1f54c06c3b51299a5e2741abc03b011f1fc#diff-cb47ef7d0e19449170a213e3b98f409f44e697f7113021355d6a5cd0fbee3387R821)
Now, from what I can see on the official github of the bcmath_compat library, this deprecated message has already been dealt with:
[ github.com/phpseclib/bcmath\_compat/blob/master/src/BCMath.php](https://github.com/phpseclib/bcmath_compat/blob/master/src/BCMath.php)
Similarly, you can change the line:
return call_user_func_array('self::' . $name, $arguments);
to:
return call_user_func_array(self::class . "::$name", $arguments);
and it will remove that deprecated message.
In the long term, Joomla will update the bcmath_compat library and it will remove the deprecated message.

You could also turn off the "error reporting" in the Joomla configuration. That should actually be the case on any live website for security reasons.

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

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

Less More

- Posts: 181
- Thank you received: 28
-
-

2 years 1 month ago [\#363555](#363555) by [yerg55](/forum/user/60833-yerg55 "View yerg55's Profile")  Replied by *[yerg55](/forum/user/60833-yerg55 "View yerg55's Profile")* on topic *[Error on Add to cart](/forum/25-install-update/908675-error-on-add-to-cart#363555 "-- HikaShop version -- : 5.1.1 &#91;2409180854&#93; -- Joomla version -- : 4.4.8 -- PHP version -- : 8.2.23 -- Error-message(debug-mod must be tuned on) -- : Deprecated: Use of &quot;self&quot; in callables is deprecated in /libraries/vendor/phpseclib/bcmath&#95;compat/src/BCMath.php on line 492  Adding any item to the cart throws 25 identical errors in the cart module as follows  Updating everything before chasing other issues discussed here and this popped up")*

As I mentioned elsewhere is that this error is prohibiting transfer to Square for payment and return

I turned on debug to find out why and that was my discovery.

Been in contact with credentials to ascertain what the issue is.

Await the discovery
Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwODY3NS1lcnJvci1vbi1hZGQtdG8tY2FydD90bXBsPW1hcmtkb3du) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86576
- Thank you received: 14318
-
-

2 years 1 month ago [\#363557](#363557) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Error on Add to cart](/forum/25-install-update/908675-error-on-add-to-cart#363557 "-- HikaShop version -- : 5.1.1 &#91;2409180854&#93; -- Joomla version -- : 4.4.8 -- PHP version -- : 8.2.23 -- Error-message(debug-mod must be tuned on) -- : Deprecated: Use of &quot;self&quot; in callables is deprecated in /libraries/vendor/phpseclib/bcmath&#95;compat/src/BCMath.php on line 492  Adding any item to the cart throws 25 identical errors in the cart module as follows  Updating everything before chasing other issues discussed here and this popped up")*

Hi,

No. This is not an error. It's a deprecated message. It tells the developer that they need to adapt the code for futur versions of PHP.
It doesn't change the behavior of the system. So your issue with Square is not linked to this. That's why I brushed it off in the other thread ( [ www.hikashop.com/forum/payment-methods/9...stration-issues.html](https://www.hikashop.com/forum/payment-methods/908624-payment-registration-issues.html) ).

I specifically researched the deprecated message here as you posted it as a separate message. I also provided the solution in my previous message here. If you apply the change, you'll see that the deprecated message doesn't appear anymore. And you'll see that you'll still have the same issue with Square as the two are not linked.

So I think we can close this subject here and focus on the real problem you have on the other thread.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwODY3NS1lcnJvci1vbi1hZGQtdG8tY2FydD90bXBsPW1hcmtkb3du) 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.117 seconds

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