Merge pull request #8446 from hregis/develop_dict

Fix: Parameter must be an array or an object that implements Countable
This commit is contained in:
Laurent Destailleur 2018-03-24 16:41:04 +01:00 committed by GitHub
commit 0a2db0d745
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -215,7 +215,7 @@ print '<tr class="liste_titre"><th >' . $langs->trans("Statistics") . ' ' . img_
print '<tr><td>';
// 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']);