From: Stéphane Jacob Date: Tue, 29 Nov 2011 13:28:52 +0000 (+0100) Subject: Do not fetch all companies if no id is provided. X-Git-Tag: xorg/1.1.5~77 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=5cb8a7e0c562a0cd459a9178190057b9cc15cad5;p=platal.git Do not fetch all companies if no id is provided. Signed-off-by: Stéphane Jacob --- diff --git a/include/profilefields.inc.php b/include/profilefields.inc.php index ef574c0..263fcb5 100644 --- a/include/profilefields.inc.php +++ b/include/profilefields.inc.php @@ -875,7 +875,7 @@ class CompanyList static public function get($id) { - if (!array_key_exists($id, self::$companies)) { + if (!is_null($id) && !array_key_exists($id, self::$companies)) { self::preload(); } if (isset(self::$companies[$id])) {