Avoid access to member of non-objects.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Tue, 8 Mar 2011 20:48:27 +0000 (21:48 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Tue, 8 Mar 2011 20:48:27 +0000 (21:48 +0100)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
include/wiki/farmconfig.php

index 243d2d8..2faf4f9 100644 (file)
@@ -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 '<a href="profile/' . $link . '" class="popup2">' . $text . '</a>';