From: Florent Bruneau Date: Tue, 8 Mar 2011 20:48:27 +0000 (+0100) Subject: Avoid access to member of non-objects. X-Git-Tag: xorg/1.1.0~49 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=0a7895a33d0aa761b00a5df06b7f775455782669;p=platal.git Avoid access to member of non-objects. Signed-off-by: Florent Bruneau --- diff --git a/include/wiki/farmconfig.php b/include/wiki/farmconfig.php index 243d2d8..2faf4f9 100644 --- a/include/wiki/farmconfig.php +++ b/include/wiki/farmconfig.php @@ -98,6 +98,9 @@ function doPlatalLink($link, $text) { if (strlen(trim($text)) == 0) { $profile = Profile::get($link); + if (!$profile) { + return '##Utilisateur inconnu##' . $text . '##'; + } $text = $profile->fullName(); } return '' . $text . '';