
Originally Posted by
plbs
Well, I'm a PHP and ZC newb, so I don't know if this is the ideal solution, but I did come up with a fix for my #2 problem above.
I edited admin\includes\function\general.php, specifically the three date conversion functions, zen_date_long, zen_date_short, and zen_datetime_short
Each of those starts with an if ... return false statement to trap essentially blank input. It was trapping '0001-01-01 00:00:00' as a "blank" date, but I found that my NULL date field was actually evaluating to "0000-00-00" as a string. So I added another OR to each of those IF statements:
function zen_date_long($raw_date) {
if ( ($raw_date == '0001-01-01 00:00:00') || ($raw_date == '0000-00-00') || ($raw_date == '') ) return false; //<-- edited this line
function zen_date_short($raw_date) {
if ( ($raw_date == '0001-01-01 00:00:00') || ($raw_date == '0000-00-00') || ($raw_date == '') ) return false; //<-- edited this line
function zen_datetime_short($raw_datetime) {
if ( ($raw_datetime == '0001-01-01 00:00:00') || ($raw_datetime == '0000-00-00') || ($raw_datetime == '') ) return false; //<-- edited this line
Bookmarks