Fix: Parameter must be an array or an object that implements Countable

This commit is contained in:
Regis Houssin 2018-03-23 11:07:35 +01:00
parent 171ad5dce2
commit 2fb0fc39a5
2 changed files with 4 additions and 4 deletions

View File

@ -1038,7 +1038,7 @@ class Ticketsup extends CommonObject
{ {
global $langs; global $langs;
if (count($this->cache_types_tickets)) { if (! empty($this->cache_types_tickets) && count($this->cache_types_tickets)) {
return 0; return 0;
} }
// Cache deja charge // Cache deja charge
@ -1078,7 +1078,7 @@ class Ticketsup extends CommonObject
{ {
global $langs; global $langs;
if (count($this->cache_category_tickets)) { if (! empty($this->cache_types_tickets) && count($this->cache_category_tickets)) {
return 0; return 0;
} }
// Cache deja charge // Cache deja charge
@ -1118,7 +1118,7 @@ class Ticketsup extends CommonObject
{ {
global $langs; global $langs;
if (count($this->cache_severity_tickets)) { if (! empty($this->cache_types_tickets) && count($this->cache_severity_tickets)) {
return 0; return 0;
} }
// Cache deja charge // Cache deja charge

View File

@ -215,7 +215,7 @@ print '<tr class="liste_titre"><th >' . $langs->trans("Statistics") . ' ' . img_
print '<tr><td>'; print '<tr><td>';
// don't display graph if no series // don't display graph if no series
if (count($dataseries) >1) { if (! empty($dataseries) && count($dataseries) > 1) {
$data = array(); $data = array();
foreach ($dataseries as $key => $value) { foreach ($dataseries as $key => $value) {
$data[] = array($value['label'], $value['data']); $data[] = array($value['label'], $value['data']);