Merge pull request #23329 from grandoc/new_branch_24_12_2022
Warning: count(): Parameter must be an array or an object
This commit is contained in:
commit
94cd5da279
@ -220,7 +220,9 @@ class box_actions extends ModeleBoxes
|
|||||||
if (!empty($conf->global->SHOW_DIALOG_HOMEPAGE)) {
|
if (!empty($conf->global->SHOW_DIALOG_HOMEPAGE)) {
|
||||||
$actioncejour = false;
|
$actioncejour = false;
|
||||||
$contents = $this->info_box_contents;
|
$contents = $this->info_box_contents;
|
||||||
$nblines = count($contents);
|
if (is_countable($contents) && count($contents) > 0) {
|
||||||
|
$nblines = count($contents);
|
||||||
|
}
|
||||||
if ($contents[0][0]['text'] != $langs->trans("NoActionsToDo")) {
|
if ($contents[0][0]['text'] != $langs->trans("NoActionsToDo")) {
|
||||||
$out .= '<div id="dialogboxaction" title="'.$nblines." ".$langs->trans("ActionsToDo").'">';
|
$out .= '<div id="dialogboxaction" title="'.$nblines." ".$langs->trans("ActionsToDo").'">';
|
||||||
$out .= '<table width=100%>';
|
$out .= '<table width=100%>';
|
||||||
|
|||||||
@ -1567,7 +1567,9 @@ function dol_meta_create($object)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_dir($dir)) {
|
if (is_dir($dir)) {
|
||||||
$nblines = count($object->lines);
|
if (is_countable($object->lines) && count($object->lines) > 0) {
|
||||||
|
$nblines = count($object->lines);
|
||||||
|
}
|
||||||
$client = $object->thirdparty->name." ".$object->thirdparty->address." ".$object->thirdparty->zip." ".$object->thirdparty->town;
|
$client = $object->thirdparty->name." ".$object->thirdparty->address." ".$object->thirdparty->zip." ".$object->thirdparty->town;
|
||||||
$meta = "REFERENCE=\"".$object->ref."\"
|
$meta = "REFERENCE=\"".$object->ref."\"
|
||||||
DATE=\"" . dol_print_date($object->date, '')."\"
|
DATE=\"" . dol_print_date($object->date, '')."\"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user