Skip to content

Commit

Permalink
Check not null date
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonge committed Jan 16, 2015
1 parent f74d8a6 commit 2cbc315
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/cms/html/html.php
Expand Up @@ -975,7 +975,7 @@ public static function calendar($value, $name, $id, $format = '%Y-%m-%d', $attri
static::_('bootstrap.tooltip');

// Format value when not nulldate ('0000-00-00 00:00:00'), otherwise blank it as it would result in 1970-01-01.
if ($value != JFactory::getDbo()->getNullDate())
if (!is_null($value) && $value != JFactory::getDbo()->getNullDate())
{
$tz = date_default_timezone_get();
date_default_timezone_set('UTC');
Expand Down

0 comments on commit 2cbc315

Please sign in to comment.