Form Tools
Bug in ft_api_delete_unfinalized_submissions() - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: API (https://forums.formtools.org/forumdisplay.php?fid=17)
+--- Thread: Bug in ft_api_delete_unfinalized_submissions() (/showthread.php?tid=27709)



Bug in ft_api_delete_unfinalized_submissions() - inscara - Sep 5th, 2017

Hi,

The ft_api_delete_unfinalized_submissions() uses curdate() instead of now() function to compare the submission time when the second parameter is false. The MySQL curdate() just returns a date e.g. D.M.YYYY without time information. However, the now() function returns the current date and time. So, the current implementation do not delete the unfinalized submissions older than 2 hours as stated in the documentation, but just those older than today. The correct way to comply with the documentation should be to use now() function.