From 0a7895a33d0aa761b00a5df06b7f775455782669 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Tue, 8 Mar 2011 21:48:27 +0100 Subject: [PATCH] Avoid access to member of non-objects. Signed-off-by: Florent Bruneau --- include/wiki/farmconfig.php | 3 +++ 1 file changed, 3 insertions(+) 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 . ''; -- 2.1.4