Commit eae5541c authored by David Lesieur's avatar David Lesieur

Fixed warning.

parent b40d0b6a
......@@ -219,17 +219,17 @@ class date_facet_category extends cck_facet_category {
function get_label($html = FALSE) {
if (isset($this->_value['day'])) {
// Format date with YYYY-MM-DD.
$timestamp = gmmktime(0, 0, 0, $this->_value['month'], $this->_value['day'], $this->_value['year']);
$timestamp = gmmktime(0, 0, 0, (int)$this->_value['month'], (int)$this->_value['day'], (int)$this->_value['year']);
$format = variable_get('date_facets_format_ymd', 'm/d/Y');
}
elseif (isset($this->_value['month'])) {
// Format date with YYYY-MM.
$timestamp = gmmktime(0, 0, 0, $this->_value['month'], 1, $this->_value['year']);
$timestamp = gmmktime(0, 0, 0, (int)$this->_value['month'], 1, (int)$this->_value['year']);
$format = variable_get('date_facets_format_ym', 'm/Y');
}
elseif (isset($this->_value['year'])) {
// Format date with YYYY.
$timestamp = gmmktime(0, 0, 0, 1, 1, $this->_value['year']);
$timestamp = gmmktime(0, 0, 0, 1, 1, (int)$this->_value['year']);
$format = variable_get('date_facets_format_y', 'Y');
}
if ($timestamp) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment