Prevents warning.
authorStéphane Jacob <sj@m4x.org>
Mon, 20 Dec 2010 17:42:07 +0000 (18:42 +0100)
committerStéphane Jacob <sj@m4x.org>
Mon, 20 Dec 2010 17:47:34 +0000 (18:47 +0100)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
include/profilefields.inc.php

index 056b01b..968c416 100644 (file)
@@ -770,7 +770,10 @@ class CompanyList
         if (!array_key_exists($id, self::$companies)) {
             self::preload();
         }
-        return self::$companies[$id];
+        if (isset(self::$companies[$id])) {
+            return self::$companies[$id];
+        }
+        return null;
     }
 }