Issue was caused by two overrides:
1. /override/classes/Cart.php
2. /override/modules/ps_shoppingcart/ps_shoppingcart.php
One or both of these overrides were created by the module “Automatically add product to cart”. This caused no problem for a the last two years at least. Why it all of a sudden became a problem is not clear to me. Maybe Prestashop updated automatically and the original overrides became incompatible.
This issue was resolved for me by forum member J.Sahu https://www.prestashop.com/forums/profile/673902-jsahu/. He fixed it quickly at a reasonable price.
.png.022b5452a8f28f552bc9430097a16da2.png)