diff --git a/htdocs/ticketsup/class/ticketsup.class.php b/htdocs/ticketsup/class/ticketsup.class.php index e201f1ab5bd..76902714a9e 100644 --- a/htdocs/ticketsup/class/ticketsup.class.php +++ b/htdocs/ticketsup/class/ticketsup.class.php @@ -1038,7 +1038,7 @@ class Ticketsup extends CommonObject { global $langs; - if (count($this->cache_types_tickets)) { + if (! empty($this->cache_types_tickets) && count($this->cache_types_tickets)) { return 0; } // Cache deja charge @@ -1078,7 +1078,7 @@ class Ticketsup extends CommonObject { global $langs; - if (count($this->cache_category_tickets)) { + if (! empty($this->cache_category_ticket) && count($this->cache_category_tickets)) { return 0; } // Cache deja charge @@ -1118,7 +1118,7 @@ class Ticketsup extends CommonObject { global $langs; - if (count($this->cache_severity_tickets)) { + if (! empty($this->cache_severity_tickets) && count($this->cache_severity_tickets)) { return 0; } // Cache deja charge diff --git a/htdocs/ticketsup/index.php b/htdocs/ticketsup/index.php index 8881b8c3ad2..b98a81f204e 100644 --- a/htdocs/ticketsup/index.php +++ b/htdocs/ticketsup/index.php @@ -215,7 +215,7 @@ print '' . $langs->trans("Statistics") . ' ' . img_ print ''; // don't display graph if no series -if (count($dataseries) >1) { +if (! empty($dataseries) && count($dataseries) > 1) { $data = array(); foreach ($dataseries as $key => $value) { $data[] = array($value['label'], $value['data']);