Page 1 of 1

getTimestamp BUG

Posted: Wed Mar 26, 2008 12:34 pm
by barros
Hello..

I've just found other BUG on processmaker. I have a clean installation and then I added a few new users.. After that I couldnt login using any of the newly created users, neither edit them using admin. I get a exception saying that it was not possible to convert a timestamp. I investigated and noticed that for a new users, there are some fields that is filled with blank timestamp (0000-00-00 00:00:00) and that's causing problems with the getTimestamp code located at gulliver/thirdparty/creole/drivers/mysql/MySQLResultSet.php. The reason for the problem is that it uses strtotime on the timestamp in order to get the Epoch value. After a little googling I discovered that PHP <= 5.2.5 returns a weird value when calling strtotime with 0000-00-00 00:00:00 timestamp and this is a PHP BUG. As of version 5.2.5 it was fixed and now returns FALSE, breaking the code. I think processmaker relies on a PHP Bug and DO NOT WORK on PHP v >= 5.2.5 (I dont know the exacly version, that is the version I have here and I'm sure 5.2.2 has this BUG). I coded a workaround to check if timestamp == 0000-00-00 00:00:00 and return 0.

Any thoughts?

Thanks

Carlos Barros