From ae36eeb7084538d35e681364bec7fa8e8b3e3082 Mon Sep 17 00:00:00 2001 From: jengo Date: Sat, 6 Oct 2001 03:37:58 +0000 Subject: [PATCH] Added error checking for name2id() and id2name(), return False when the account_id or account_lid is missing --- phpgwapi/inc/class.accounts_sql.inc.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/phpgwapi/inc/class.accounts_sql.inc.php b/phpgwapi/inc/class.accounts_sql.inc.php index fb906f21aa..ac0ee9175c 100644 --- a/phpgwapi/inc/class.accounts_sql.inc.php +++ b/phpgwapi/inc/class.accounts_sql.inc.php @@ -156,6 +156,11 @@ { static $name_list; + if (! $account_lid) + { + return False; + } + if($name_list[$account_lid] && $name_list[$account_lid] != '') { return $name_list[$account_lid]; @@ -178,6 +183,11 @@ { static $id_list; + if (! $account_id) + { + return False; + } + if($id_list[$account_id]) { return $id_list[$account_id];