From d82aae1871989014ca26d049e3540ba199e1ce04 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 23 Mar 2022 16:39:55 +0100 Subject: [PATCH] Update functions.lib.php --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 89ba7147694..4dd675f9a28 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -8779,7 +8779,7 @@ function complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, if (class_exists($classtoload)) { $obj = new $classtoload($db); $function = $labeltemp[3]; - if (method_exists($obj, $function)) { + if ($obj && $function && method_exists($obj, $function)) { $nbrec = $obj->$function($object->id, $obj); $label .= ''.$nbrec.''; }