From fa3cefd455fe7fa56c417c01a5cbdfa1bfa83ecf Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 17 Dec 2005 12:07:36 +0000 Subject: [PATCH] fixed PHP5 warning --- lam/lib/modules.inc | 1 + lam/lib/modules/posixGroup.inc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index a427146a..66430c6d 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -1433,6 +1433,7 @@ class accountContainer { foreach ($module as $singlemodule) { // load changes $temp = $this->module[$singlemodule]->save_attributes(); + if (!is_array($temp)) $temp = array(); // merge changes $DNs = array_keys($temp); // *** fixme don't include references diff --git a/lam/lib/modules/posixGroup.inc b/lam/lib/modules/posixGroup.inc index b9139c54..f1dfcb20 100644 --- a/lam/lib/modules/posixGroup.inc +++ b/lam/lib/modules/posixGroup.inc @@ -579,7 +579,7 @@ class posixGroup extends baseModule { $maxID = intval($this->moduleSettings['posixGroup_maxGID'][0]); $dn_gids = $_SESSION['cache']->get_cache('gidNumber', 'posixGroup', 'group'); // get_cache will return an array ( dn1 => array(uidnumber1), dn2 => array(uidnumber2), ... ) - if(is_array($dn_gids)) { + if(is_array($dn_gids) && (sizeof($dn_gids) > 0)) { foreach ($dn_gids as $gid) $gids[] = $gid[0]; sort ($gids, SORT_NUMERIC); }