Fixed Creating a poll with a 10000 month expiration causes a server error

Snoozero

Active member
Caught this one in my error log earlier today.

Code:
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Out of range value for column 'close_date' at row 1 - library/Zend/Db/Statement/Mysqli.php:214
 
Wouldn't that be a poll that is active for 833 years? I just tested and it works for 600 months which is 50 years and to be honest I don't see a poll needing to be open that long.

It works up to 1132 months which is 94 and a 1/3 years , I could be wrong but I would feel safe to guess that this is not a bug?
 
While it's true that a poll shouldn't be open that long, it should probably be either triggering a graceful error message, or getting capped -- not throwing an uncaught exception.
 
Caught this one in my error log earlier today.

Code:
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Out of range value for column 'close_date' at row 1 - library/Zend/Db/Statement/Mysqli.php:214
I've tried to reproduce this locally, but I'm getting quite a different behaviour (which I have fixed anyway) but could you tell me what version of PHP and MySQL your server is running please?
 
php 5.3.8 and mysql 5.1.58
Okay, that's a little unexpected (I was anticipating a PHP 5.2.x answer) but I think my fix will resolve your problem. Please post back in this issue if you can still reproduce it when Beta 4 comes out :)
 
Top Bottom