From ed5d1196b2e7bbd9ab5734070c78d907d8ff47f9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 13 Mar 2013 17:34:54 +0100 Subject: [PATCH] Fix: no link if user unknown --- htdocs/core/class/html.formactions.class.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 514ffb6eab5..827a65ed51f 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -188,10 +188,15 @@ class FormActions print ''.$ref.''; print ''.$label.''; print ''.dol_print_date($action->datep,'day').''; - $userstatic->id = $action->author->id; - $userstatic->firstname = $action->author->firstname; - $userstatic->lastname = $action->author->lastname; - print ''.$userstatic->getNomUrl(1).''; + print ''; + if (! empty($action->author->id)) + { + $userstatic->id = $action->author->id; + $userstatic->firstname = $action->author->firstname; + $userstatic->lastname = $action->author->lastname; + print $userstatic->getNomUrl(1); + } + print ''; print ''; } print '';