Fix bad return value

This commit is contained in:
Laurent Destailleur 2020-07-10 03:02:49 +02:00
parent f2c84fba3d
commit bb056fc811
2 changed files with 10 additions and 5 deletions

View File

@ -6715,12 +6715,12 @@ abstract class CommonObject
if (!is_object($form)) $form = new Form($db); if (!is_object($form)) $form = new Form($db);
$out = '';
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('showOptionals',$parameters,$this,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('showOptionals',$parameters,$this,$action); // Note that $action and $object may have been modified by hook
if (empty($reshook)) if (empty($reshook))
{ {
$out = '';
if (is_array($extrafields->attributes[$this->table_element]['label']) && count($extrafields->attributes[$this->table_element]['label']) > 0) if (is_array($extrafields->attributes[$this->table_element]['label']) && count($extrafields->attributes[$this->table_element]['label']) > 0)
{ {
$out .= "\n"; $out .= "\n";
@ -6942,11 +6942,15 @@ abstract class CommonObject
setListDependencies(); setListDependencies();
}); });
</script>'."\n"; </script>'."\n";
$out .= '<!-- /showOptionalsInput --> '."\n";
} }
$out .= '<!-- /showOptionalsInput --> '."\n";
} }
return $out; }
} // end of hook manager
$out .= $hookmanager->resPrint;
return $out;
} }

View File

@ -207,6 +207,7 @@ class HookManager
'restrictedArea', 'restrictedArea',
'sendMail', 'sendMail',
'sendMailAfter', 'sendMailAfter',
'showOptionals',
'showLinkToObjectBlock', 'showLinkToObjectBlock',
'setContentSecurityPolicy', 'setContentSecurityPolicy',
'setHtmlTitle', 'setHtmlTitle',