From b5f3813c830d6438ef4d5420c30f3d6bb6d8f3f3 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Mon, 23 Jan 2006 19:26:16 +0000 Subject: [PATCH] less PHP notices --- lam/lib/modules.inc | 2 +- lam/lib/modules/inetOrgPerson.inc | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index 65780b39..fedc0492 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -1357,11 +1357,11 @@ class accountContainer { $this->rdn = split("=", substr($dn, 0, strpos($dn, ','))); $this->rdn = $this->rdn[0]; $attr = ldap_get_attributes($_SESSION['ldap']->server(), $entry); - $attrNames = array_keys($attr); // remove 'count' entries and numerical entries for ($i = 0; $i < count($attr); $i++) { if (isset($attr[$i])) unset($attr[$i]); } + $attrNames = array_keys($attr); for ($i = 0; $i < sizeof($attrNames); $i++) unset($attr[$attrNames[$i]]['count']); unset($attr['count']); // get binary attributes diff --git a/lam/lib/modules/inetOrgPerson.inc b/lam/lib/modules/inetOrgPerson.inc index 76222019..c9b8cbe1 100644 --- a/lam/lib/modules/inetOrgPerson.inc +++ b/lam/lib/modules/inetOrgPerson.inc @@ -430,6 +430,7 @@ class inetOrgPerson extends baseModule { * @return array list of info/error messages */ function process_attributes(&$post) { + $triggered_messages = array(); // Load attributes $this->attributes['description'][0] = $post['description']; $this->attributes['sn'][0] = $post['sn']; @@ -514,8 +515,8 @@ class inetOrgPerson extends baseModule { } if ($post['delPhoto']) $this->attributes['jpegPhoto'] = array(); // Return error-messages - if (is_array($triggered_messages)) return $triggered_messages; - } + return $triggered_messages; + } /* This function will create the html-page * to show a page with all attributes.