Skip to content

Commit

Permalink
Parameter must be array or object that implements Countable
Browse files Browse the repository at this point in the history
warning with php 7.2
  • Loading branch information
frederic34 committed Jun 6, 2019
1 parent ab77051 commit f11db83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/core/lib/agenda.lib.php
Expand Up @@ -469,7 +469,7 @@ function actions_prepare_head($object)

$head[$h][0] = DOL_URL_ROOT.'/resource/element_resource.php?element=action&element_id='.$object->id;
$listofresourcelinked = $resource->getElementResources($object->element, $object->id);
$nbResources=count($listofresourcelinked);
$nbResources=is_array($listofresourcelinked)?count($listofresourcelinked):0;
$head[$h][1] = $langs->trans("Resources");
if ($nbResources > 0) $head[$h][1].= ' <span class="badge">'.($nbResources).'</span>';
$head[$h][2] = 'resources';
Expand Down

0 comments on commit f11db83

Please sign in to comment.