Commit c9e40c0517f2d775e48b4f834abbf9eced91fa5c

Authored by nbm
1 parent dd95cd1b

PHP5 fix - array_merge no longer handles being passed a non-array (such

as null)


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3565 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 4 additions and 1 deletions
lib/groups/GroupUtil.php
... ... @@ -234,7 +234,10 @@ class GroupUtil {
234 234 $aParams = array($oUser->getID());
235 235 $aGroupIDs = DBUtil::getResultArrayKey(array($sQuery, $aParams), "group_id");
236 236 foreach ($aGroupIDs as $iGroupID) {
237   - $aGroupIDs = array_merge($aGroupIDs, KTUtil::arrayGet($aGroupArray, $iGroupID));
  237 + $aExtraIDs = KTUtil::arrayGet($aGroupArray, $iGroupID);
  238 + if (is_array($aExtraIDs)) {
  239 + $aGroupIDs = array_merge($aGroupIDs, $aExtraIDs);
  240 + }
238 241 }
239 242 $aGroupIDs = array_unique($aGroupIDs);
240 243 sort($aGroupIDs);
... ...