Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[16.0][FIX] website_sale_cart_expire: Protect _setExpirationDate assi…
…gnment error Added format check before setting the datetime in str_to_datetime in order to avoid error message in website. It checks "/shop/cart/get_expire_date" url to retrieve the information, but when it's installed some module that restricts the access to some url (like website_require_login) it retrieves HTML from the redirection. Function evaluates "expireDate" as string and tries to convert it to datetime, but it's not a date so raises throws error. Now checks if the string has a valid format date before try to convert it otherwise sets "expireDate" to undefined.
- Loading branch information