WebGUI
      Click here to register.
      
PBWG Banner


     Report a Bug > WebGUI Bug Tracker

SQLForm and date isNULL

User remsnel
Date 4/9/2007 2:00 am
Severity Critical (mostly not working)
Version WebGUI 7.3.14
Views 297
Rating -1    Rate [
|
]
Karma Rank 10.000000
Previous · Next
User Message
remsnel

When you have a date field in a record with a NULL value and you want to edit the record you ending in the search function. The webgui log give the next error.

at /data/wre/prereqs/perl/lib/site_perl/5.8.8/DateTime/Format/Strptime.pm
line 444 2007/04/09 00:03:14 - WARN - wgtest.conf - main::[[undef]] -
Couldn't call method editRecord on asset for url:  dir/dir/nameassetsqlform
Root cause: The 'month' parameter ("00") to DateTime::new did not pass the 'is between 1 and 12' callback  at /data/wre/prereqs/perl/lib/site_perl/5.8.8/DateTime/Format/Strptime.pm line 444



Back to Top
Rate [
|
]
 
 
nogura

Its fixed.  MySQL null dates are now converted to undef.  This prevents the program from dying. 

However, undef dates are automatically converted to today's date, so be warned. 

To fix it so that it handles null MySQL dates gracefully without changing them would be a RFE.  Please submit it as such if that is your desire.



Back to Top
Rate [
|
]