[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-tracker] [bug #5482] function get_specific_rights - error
From: |
nobody |
Subject: |
[Phpgroupware-tracker] [bug #5482] function get_specific_rights - error when checking group permissions |
Date: |
Tue, 23 Sep 2003 00:48:42 -0400 |
User-agent: |
Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20030131 |
=================== BUG #5482: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=5482&group_id=509
Changes by: Johnson <address@hidden>
Date: Tue 09/23/2003 at 04:48 (GMT)
------------------ Additional Follow-up Comments ----------------------------
near line 360 of phpgwapi/inc/class.acl.inc.php
the problem is when you use get_specific_rights on a group account id and have
$checkgroups=True
the $userGroups = $GLOBALS['phpgw']->accounts->membership($this->account_id);
returns a false and then you get an error at while (list($null,$ad_account) =
each($userGroups)) since $userGroups is not an array (it is false or null)
it is rare that someone would do this, but adding $userGroups = $userGroups ?
$userGroups : array(); between the above lines eliminates the error
=================== BUG #5482: FULL BUG SNAPSHOT ===================
Submitted by: jecinc Project: phpGroupWare
Submitted on: Mon 09/22/2003 at 20:54
Category: API - phpGWapi Bug Group: 0.9.16RC1
Severity: 5 - Major Priority: Normal
Resolution: None Assigned to: skwashd
Status: Open Component Version: CVS
Platform Version: Linux - RedHat Reproducibility: None
Summary: function get_specific_rights - error when checking group permissions
Original Submission: Warning output when processing group id's at line:
while (list($null,$ad_account) = each($userGroups))
The function works as expected but issues warnings to screen.
problem is that $userGroups =
$GLOBALS['phpgw']->accounts->membership($this->account_id); doesn't return and
array when $this->account_id is a group
adding $userGroups = $userGroups ? $userGroups : array(); before the while()
gets rid of the error
Follow-up Comments
*******************
-------------------------------------------------------
Date: Tue 09/23/2003 at 04:48 By: jecinc
near line 360 of phpgwapi/inc/class.acl.inc.php
the problem is when you use get_specific_rights on a group account id and have
$checkgroups=True
the $userGroups = $GLOBALS['phpgw']->accounts->membership($this->account_id);
returns a false and then you get an error at while (list($null,$ad_account) =
each($userGroups)) since $userGroups is not an array (it is false or null)
it is rare that someone would do this, but adding $userGroups = $userGroups ?
$userGroups : array(); between the above lines eliminates the error
-------------------------------------------------------
Date: Mon 09/22/2003 at 22:54 By: skwashd
Hi,
Can you please provide the error message that is being generated. I have
grep'd for this code and can't find it anywhere.
Cheers
CC list is empty
No files currently attached
For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=5482&group_id=509
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/