Merge pull request #12564 from atm-john/develop_fix_task_extrafield_fatal_error

Fix Fatal error : task extrafield error
This commit is contained in:
Laurent Destailleur 2019-12-01 00:45:23 +01:00 committed by GitHub
commit dc77b47d7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -605,7 +605,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $taskstatic, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && !empty($extrafields[$taskstatic->table_element]['label']))
if (empty($reshook) && !empty($extrafields->attributes[$taskstatic->table_element]['label']))
{
print $taskstatic->showOptionals($extrafields, 'edit'); // Do not use $object here that is object of project but use $taskstatic
}