Closed
Description
Customer with empty "Date of Birth" cannot be saved even when it is not marked (or checked on the JS side) as mandatory.
I didn't know how to re-open issue #11989 so I'm creating a new one. Now, I'm installing the latest Magento version (2.2.1), which has the same problem. The PHP version might be important (as pointed out by @Blatant at #11989 (comment)), it's 7.1.11, although I got the error with 7.1.7, too, previously.
I've also prepared an automated way of setting up the environment and installing Magento by Docker: https://github.com/JanisE/magento_test_1 Use it, please, if you cannot reproduce the bug in your test environments.
Preconditions
- OS: Linux Mint 18.2 (based on Ubuntu Xenial).
- PHP 7.1.11
- Magento CE 2.2.1 without sample data is installed by Composer.
Steps to reproduce
- Sign up as a new user entering whatever name, e-mail, password.
- In Admin go to Stores -> Customers -> All customers and click "Edit" for the created customer.
- Go to "Account Information" and change "Group" from "General" to "Reseller".
- Click "Save Customer".
Expected result
- Either the customer gets saved
- Or
2.1. Account Information -> "Date of Birth" field is marked as mandatory;
2.2. "This is a required field." appears beneath "Date of Birth" if it is empty when saving.
Actual result
- The page reloads with an error message "Something went wrong while saving the customer.".
- An error message gets logged in the "system.log" starting with
main.CRITICAL: Exception message: Warning: A non-numeric value encountered in/var/www/html/magento/vendor/magento/zendframework1/library/Zend/Locale/Math/PhpMath.php on line 94