kirubanidhi Posted October 25, 2017 Share Posted October 25, 2017 How to resolve this problem. I am using prestasshop version 1.5.6. Errors.csv file: "24 Oct 2017 18:36:33","/home2/prestashop1.5.6/public_html/controllers/front/AuthController.php: 539","(Warning) checkdate() expects parameter 1 to be long, string given" Code: if (!@checkdate(Tools::getValue('months'), Tools::getValue('days'), Tools::getValue('years')) && !(Tools::getValue('months') == '' && Tools::getValue('days') == '' && Tools::getValue('years') == '')) $this->errors[] = Tools::displayError('Invalid date of birth'); Link to comment Share on other sites More sharing options...
kirubanidhi Posted May 3, 2018 Author Share Posted May 3, 2018 Resolved this problem while changing the code from AuthController.php if (!@checkdate((int)Tools::getValue('months'), (int)Tools::getValue('days'), (int)Tools::getValue('years')) && !(Tools::getValue('months') == '' && Tools::getValue('days') == '' && Tools::getValue('years') == '')) $this->errors[] = Tools::displayError('Invalid date of birth'); Typecast are applied when getting value from DB. Link to comment Share on other sites More sharing options...
kirubanidhi Posted May 3, 2018 Author Share Posted May 3, 2018 Just now, kirubanidhi said: Resolved this problem while changing the code from AuthController.php if (!@checkdate((int)Tools::getValue('months'), (int)Tools::getValue('days'), (int)Tools::getValue('years')) && !(Tools::getValue('months') == '' && Tools::getValue('days') == '' && Tools::getValue('years') == '')) $this->errors[] = Tools::displayError('Invalid date of birth'); Typecast are applied when getting value from DB. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now