Magento 1 with Php 7.2, error to add to the cart if the product has an option

I have Magneto 1.9.3.10 with the patch for PHP 7.2 applied.
If I click on "add to cart" in a product that has options and no option is selected, this error appears:




Exception: Warning: count (): the parameter must be an array or an object that implements Countable in /var/www/html/app/code/core/Mage/Catalog/Model/Product/Option/Type/Select.php in line 57 in /var/www/html/app/code/core/Mage/Core/functions.php:232
Battery tracking:
# 0 /var/www/html/app/code/core/Mage/Catalog/Model/Product/Option/Type/Select.php(57): mageCoreErrorHandler (2, & # 39; count (): Parame ... & # 39 ;, & # 39; / var / www / html / a ... & # 39 ;, 57, Array)
# 1 /var/www/html/app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php(533): Mage_Catalog_Model_Product_Option_Type_Select-> validateUserValue (NULL)
# 2 /var/www/html/app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php(322): Mage_Catalog_Model_Product_Type_Abstract where we are working on an object. (Object (Varien_Object)))
# 3 /var/www/html/app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php(410): Mage_Catalog_Model_Product_Type_Acstract_Melenez /)
# 4 /var/www/html/app/code/core/Mage/Sales/Model/Quote.php(969): Mage_Catalog_Model_Product_Type_Abstract-> prepareForCartAdvanced (Object (Varien_Object), Object (Mage_Catalog_Model_Product)
# 5 /var/www/html/app/code/core/Mage/Sales/Model/Quote.php(1045): Mage_Sales_Model_Quote-> addProductAdvanced (Object (Mage_Catalog_Model_Product), Object (Varien_Object), & # 39; full & # 39 ;)
# 6 /var/www/html/app/code/core/Mage/Checkout/Model/Cart.php(268): Mage_Sales_Model_Quote-> addProduct (Object (Mage_Catalog_Model_Product), Object (Varien_Object))
# 7 /var/www/html/app/code/core/Mage/Checkout/controllers/CartController.php(235): Mage_Checkout_Model_Cart-> addProduct (Object (Mage_Catalog_Model_Product), Array)
# 8 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Checkout_CartController-> addAction ()
# 9 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action-> dispatch (& # 39; add & # 39;)
# 10 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard-> match (Object (Mage_Core_Controller_Request_Http))
# 11 /var/www/html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front-> dispatch ()
# 12 /var/www/html/app/Mage.php(686): Mage_Core_Model_App-> run (Array)
# 13 /var/www/html/index.php(85): Mage :: run (& # 39; & # 39 ;, & # 39; store & # 39;)
# 14 {main}